Results 1 to 4 of 4

Thread: Problems with QMetaObject::invokeMethod

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2008
    Location
    Russia, Moscow
    Posts
    86
    Thanks
    2
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4

    Default Re: Problems with QMetaObject::invokeMethod

    "initialize()" - it is slot?

    Qt Code:
    1. renderWidget->winId()
    To copy to clipboard, switch view to plain text mode 
    widget may not have Id if this "Alien Widget" (ex. child inside main window).

  2. #2
    Join Date
    Feb 2009
    Posts
    22
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problems with QMetaObject::invokeMethod

    Q_ARG("int", renderWidget->width())

    Q_ARG takes a type not a string as the first argument

  3. #3

    Default Re: Problems with QMetaObject::invokeMethod

    HI ,
    Facing an issue for passing a pointer as QARG in invokeMethod :

    I am calling the api void CAppManager::launchUrl(const int f_iXcoord,const int f_iYcoord,const int f_iHeight, const int f_iWidth,const QString f_cobjUrl,unsigned long *f_ulRenHandle,bool bSetupURL) as

    QMetaObject::invokeMethod(this,"launchUrl",Qt::Que uedConnection,
    Q_ARG(int,0),Q_ARG(int,0),Q_ARG(int,480),Q_ARG(int ,800),Q_ARG(QString,sSetUpURL),Q_ARG(unsigned long*,handle),Q_ARG(bool,true));

    The issue seems to be with ARG f_ulRenHandle . As when the function had this argument only as pass by value and in InvokeMethod I had passed just Q_ARG(unsigned long,handle) instead of Q_ARG(unsigned long*,handle).It worked.
    handle here has to be pointer or refrence as its getting modified in launchURL API .Here I am using pointer as we can't use Refrences with Q_ARG.Here invoke method is always returning 0.
    I am initializing/declaring handle as follows :
    unsigned long dummyHandle=0;
    unsigned long * handle = &dummyHandle;
    Please let me know what measure should i take to solve this issue ?

Similar Threads

  1. problems creating toolbar...(do see the attachment)!
    By sumit in forum Qt Programming
    Replies: 15
    Last Post: 10th September 2008, 11:23
  2. Problems with scope and C header functions
    By waldowoc in forum Newbie
    Replies: 5
    Last Post: 5th August 2008, 11:29
  3. flicker and wierd resize problems ...
    By momesana in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2008, 18:00
  4. QT4 Plugins - problems, problems
    By NormanDunbar in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 15:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.