Results 1 to 2 of 2

Thread: processevents, filtering events

  1. #1
    Join Date
    Feb 2006
    Posts
    60
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default processevents, filtering events

    Hi,
    I am using processEvents(QEventLoop::ExcludeUserInputEvents), to exclude all user input events.

    In my app., i want to stop long running processes with ESC key, So is there any way to filter out the key press ESC.

    Please provide a code snippet if possible,

    Thanking you,

    regards,
    sree

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: processevents, filtering events

    You can use eventFilter and filter key events or reimplement keyPressEvent for your widget directly. There are examples on both subjects in the docs.

  3. The following user says thank you to wysota for this useful post:

    sreedhar (28th June 2006)

Similar Threads

  1. QStackerWidget and mouse events
    By high_flyer in forum Qt Programming
    Replies: 3
    Last Post: 25th April 2006, 19:25
  2. Discard user input events in QEventLoop.
    By Ben.Hines in forum Qt Programming
    Replies: 2
    Last Post: 17th April 2006, 20:49
  3. how to detect key pad events???
    By mahe2310 in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 13th April 2006, 04:40
  4. Delays in processing events
    By Caius Aérobus in forum Qt Programming
    Replies: 6
    Last Post: 7th April 2006, 12:42
  5. Forwarding mouse events to another widget.
    By yogeshm02 in forum Qt Programming
    Replies: 8
    Last Post: 28th February 2006, 13:25

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.