qt-interest@trolltech.com
[Top] [All Lists]

[Qt-interest] what is wrong with Q_property declaration

Subject: [Qt-interest] what is wrong with Q_property declaration
From: Santhosh Y
Date: Sat, 03 Jul 2010 15:53:20 +0530
Hi,
What is wrong with the following Q_PROPERTY declaration; Since when I call on QAxObject using dynamic call it is failing.

class COMObj : public QObject
{
    Q_OBJECT

        Q_PROPERTY(int state  READ RenewCallBack)

    public slots:
        // To create instance
        int RenewCallBack ()
        {
            QWidget* w = new QWidget();
            w->setWindowTitle ("COM WIDGET");
            w->show();
            return 0;
        }
};

// Default Factory Export
QAXFACTORY_DEFAULT(
COMObj,   // Class Name
"{09855869-3BB0-4c59-B154-975AD2B4FAFB}",   // Class Id
"{9F6756D8-6F9C-418a-A4B8-1CCA467DC60B}",   // Interface Id
"{D804C926-4DC1-4dae-AC25-75C0A78DB1D9}",   // Events Id
"{1E863943-50A2-4e3b-A8F7-1EC2FF69D485}",   // Type Lib id
"{02F8986B-993A-460c-A941-6D4C245DAA37}")  // Application id
=======================================================


QAxObject* axObj_ = new QAxObject("debugbuild.COMObj");
  if (axObj_->dynamicCall("RenewCallBack") == QVariant()) {
}

"QAxBase: Error calling IDispatch member RenewCallBack: Member not found"

Please tell me what I am doing wrong.


----------------------------------------------------
Y Santhosh Kumar - 
Senior Software Engineer,
SoftJin Technologies Pvt Ltd,
www.softjin.com
----------------------------------------------------

Business Disclaimer
____________________________________________________________
This e-mail message and any files transmitted with it are intended solely
for  the use  of the  individual or entity  to which they  are  addressed. It
may  contain confidential,  proprietary or legally  privileged  information.
If  you  are  not  the  intended recipient please be advised that you have
received  this  message in error and any use is strictly prohibited. Please
immediately  delete it  and all copies of it from your system, destroy any
hard  copies  of  it and  notify  the  sender  by return mail. You must not,
directly or indirectly, use,  disclose,  distribute, print, or copy any part of
this message if you are not the intended recipient.
___________________________________________________________
_______________________________________________
Qt-interest mailing list
Qt-interest@xxxxxxxxxxxxx
http://lists.trolltech.com/mailman/listinfo/qt-interest
<Prev in Thread] Current Thread [Next in Thread>
  • [Qt-interest] what is wrong with Q_property declaration, Santhosh Y <=