Results 1 to 4 of 4

Thread: Qt stealing events

  1. #1
    Join Date
    Jun 2010
    Posts
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Qt stealing events

    Hello, I am having a bit of a problem with Qt runing via PyQt4's python bindings under an embedded python interpreter in a graphics application. The problem is that whenever a QObject is instanced, Preassure events from my Wacom tablet dont get through to the host graphics application. It basically treats the Tablet input as a mouse, clicked/not clicked.

    What is odd is as soon as I delete the QObject I have instanced, the preassure events resume in the host application. Now even if say a QDialog is instanced, but never shown. as long as any QObject or derived class intance,exists in memory - I have this problem. I was hoping someone might be able to shed some light on this issue before i dig through the Qt Source code - Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt stealing events

    Qt is reacting to the event sent by the underlying windowing system which probably is sending the zablet as mouse events.
    What you can do in your QObject is ignore the events, they will then propagate further.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jun 2010
    Posts
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Re: Qt stealing events

    Just to follow up this post. It seems that as soon as I have instanced and shown any GUI element, I get this behavior. Instancing a QApplication and a QDialog is fine, as soon as a show my QDialog instance, even after it has been destroyed, something has triggered in the QApplication that means my wacom tablet events are no longer recieved with preassure sensitivity in the host application.

    The only way I have got around this problem is to totally destroy the QApplication after every dialog is closed. This of course means I cant have a dialog open if i want to paint in the host app.

    Any ideas ?

    I ahve tried sticking an event filter on the QApp and the QDialog and ignoring all events. still the same behavior

  4. #4
    Join Date
    Jun 2010
    Posts
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4

    Default Re: Qt stealing events

    I came across this post which seems to be the issue I am talking about.

    http://bugreports.qt.nokia.com/browse/QTBUG-6257
    Last edited by rmwatson; 22nd December 2010 at 10:44.

Similar Threads

  1. Events
    By T0bi4s in forum Newbie
    Replies: 16
    Last Post: 25th November 2009, 22:09
  2. How to show window without stealing focus?
    By piotr.dobrogost in forum Qt Programming
    Replies: 2
    Last Post: 9th June 2009, 06:26
  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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.