Results 1 to 4 of 4

Thread: Catching X Events

  1. #1
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation Catching X Events

    Can I make my app catch an Xevent? How can I achieve this? I wish the app retain its default event catching/processing capability, but I would like to provide custom functionality for 2-3 Xevents.
    Do I need to create a separate Event loop for this or can I incorporate it into the existing event loop provided by QApplication?

    Thanks

    Nupul
    Last edited by nupul; 16th April 2006 at 13:02.

  2. #2
    Join Date
    Jan 2006
    Posts
    109
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Catching X Events


  3. #3
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Catching X Events

    Well i know that dimitri, I just am not sure as to how to do it? maybe someone could provide a 3-4 line code snippet/example it'll help me understand better!


    Thanks

    Nupul

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Catching X Events

    Qt Code:
    1. bool MyApplication::x11EventFilter( XEvent *event )
    2. {
    3. if( isIteresting( event ) ) {
    4. return doSomething( event );
    5. }
    6. return false;
    7. }
    To copy to clipboard, switch view to plain text mode 

  5. The following user says thank you to jacek for this useful post:

    nupul (16th April 2006)

Similar Threads

  1. Problem with catching keyPress events ?
    By arbi in forum Qt Programming
    Replies: 12
    Last Post: 1st September 2008, 13:35
  2. QGraphicsView Mouse Events
    By tomf in forum Qt Programming
    Replies: 5
    Last Post: 29th July 2008, 16:03
  3. Replies: 9
    Last Post: 22nd June 2008, 23:26
  4. How to suppress user defined events in processEvents()
    By Artschi in forum Qt Programming
    Replies: 5
    Last Post: 5th July 2007, 11:17
  5. QStackerWidget and mouse events
    By high_flyer in forum Qt Programming
    Replies: 3
    Last Post: 25th April 2006, 20: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.