[Qt-interest] what is wrong with Q_property declaration

Santhosh Y santhosh at softjin.com
Sat Jul 3 12:23:20 CEST 2010


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.
___________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100703/c974c70c/attachment.html 


More information about the Qt-interest-old mailing list