Results 1 to 2 of 2

Thread: Events

  1. #1
    Join Date
    Oct 2011
    Posts
    48
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Events

    Hai all,


    If I reimplement any event in my application , will the default event get executed?

    For Example, I reimplemented wheelEvent in my program and I am doing nothing in that event handler.While executing program, if I use mouse wheel will it go to default or to my handler?



    Thanks

  2. #2
    Join Date
    Nov 2011
    Posts
    11
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: Events

    If it's reimplemented, it should go to the reimplemented function in your class.

    When in trouble, you could test things like that with qDebug. Just pass a message to display on the Application Output panel to be sure it's working.

    Qt Code:
    1. #include <QDebug>
    2. ...
    3. void MyClass::wheelEvent (QWheelEvent * event){
    4. qDebug() << "Wheel scrolled!";
    5. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Qt...Using Events
    By Peppy in forum Qt Programming
    Replies: 5
    Last Post: 27th December 2009, 09:41
  2. Events
    By T0bi4s in forum Newbie
    Replies: 16
    Last Post: 25th November 2009, 22:09
  3. Events
    By SV in forum Qt Programming
    Replies: 0
    Last Post: 21st May 2008, 08:48
  4. QT Events
    By Sreeja in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2006, 08:25
  5. Events - how to
    By eleanor in forum Newbie
    Replies: 2
    Last Post: 13th November 2006, 07:23

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.