Results 1 to 3 of 3

Thread: How can I call a C++ function knowing its function string?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How can I call a C++ function knowing its function string?

    Hi,

    If some one tells me there is a c++ member function, say "foo". How can I use Q_GADGET (not Q_OBJECT) to call this function?

    MyClass obj;
    obj.foo();

    However, foo is passed to me by QString "foo". The only thing I am told is that foo return void and has no argument.

    Any help is appreciated.

  2. The following 2 users say thank you to lni for this useful post:


Similar Threads

  1. Replies: 4
    Last Post: 2nd August 2012, 07:42
  2. Replies: 7
    Last Post: 9th December 2010, 22:26
  3. Qt function call in vb.net
    By abghosh in forum Qt Programming
    Replies: 7
    Last Post: 6th March 2010, 17:00
  4. function call
    By Walsi in forum Qt Programming
    Replies: 3
    Last Post: 12th June 2007, 09:13
  5. Cannot call function without object
    By Salazaar in forum Newbie
    Replies: 5
    Last Post: 11th June 2007, 14:55

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.