Results 1 to 4 of 4

Thread: create QMetaCallEevnt

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2011
    Location
    Karlsruhe, Germany
    Posts
    57
    Thanks
    10
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default create QMetaCallEevnt

    since qmetacallevent is private defined, i dont find any documentation so far.
    but for the project test purpose i need to create one for testing.

    has anyone idea?

    In my project, i need to grab the information of each queued signal/slot message for testing.
    The messages are for debugging purpose in run time.
    Therefore i have modified the notify function.

    Qt Code:
    1. bool MyApplication::notify(QObject* receiver, QEvent* event)
    2. {
    3. TEST_FLAG(SIGNAL_PROTOCOL)
    4. // test function goes here
    5. END
    6.  
    7. return QApplication::notify(receiver, event);
    8. }
    To copy to clipboard, switch view to plain text mode 

    Since there would be mass of event go through, the performance impact of the function is also of my concern.
    That's why i want to test it.

    The test function entry is defined with QMetaCallEvent.

    In my test environment, I simply setup a loop to see the run time consumption of the test function.

    Qt Code:
    1. GTEST_XXX()
    2. {
    3. for (int i = 0; i < TEN_MILLION; i++){
    4. // test function
    5. }
    6. }
    To copy to clipboard, switch view to plain text mode 

    I used to think by only accessing QMetaObject, QMetaMethod. But it is not able to fulfill my need since the argument value of the signal transmitted is also for me important.
    Last edited by cic; 21st August 2013 at 13:59.

Similar Threads

  1. How to Create lib in Qt.
    By shyam prasad in forum Qt Programming
    Replies: 6
    Last Post: 14th August 2012, 10:02
  2. Need to create a dll
    By DDHarLiN in forum Qt Programming
    Replies: 8
    Last Post: 14th August 2012, 09:30
  3. Replies: 4
    Last Post: 1st May 2009, 11:00
  4. How to create a SDK?
    By blackfox in forum Qt Programming
    Replies: 0
    Last Post: 10th September 2008, 10:23
  5. how to create pop-ups
    By miguel_mark in forum Newbie
    Replies: 1
    Last Post: 22nd October 2007, 06:16

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.