Results 1 to 3 of 3

Thread: Tracking the movement of a top-level widget

  1. #1
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Tracking the movement of a top-level widget

    In this previous thread http://www.qtcentre.org/forum/f-qt-p...get-21867.html, I found that I could use moveEvent() and resizeEvent() for a top-level widget to track its new position and size. However, this event occurs after the move or resize operation. On Windows (Vista x64), I see a steady stream of move events for the widget when I drag the window frame around the desktop. However on Linux (Ubuntu 9.04), I only get one move event - after mouse button release. On OS/X, the situation is between these two extremes - I receive the move events whenever I pause the mouse movement.

    What I would like to do is continuously track the position of the widget. The Windows sitiuation is acceptable, but not so Linux or the Mac. I've tried installing an event filter on QApplication and subclassing QApplication and reimplementing notify(). This doesn't help. I've tried subclassing QApplication and installing an x11EventFilter() - this doesn't help either.

    Any suggestions?

    Thanks in advance.

    Michael

  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: Tracking the movement of a top-level widget

    Nothing will help. With your current settings the window on Linux is moved or resized only once - after you release the mouse button. The only thing you can do is to change your desktop settings to support opaque resizes and moves. But this will only work on your system - other users might have that feature disabled for performance reasons.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    mcb (26th July 2009)

  4. #3
    Join Date
    Jun 2009
    Posts
    8
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Tracking the movement of a top-level widget

    Not the answer I was hoping for. Oh well. Thanks.

Similar Threads

  1. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. Top Level Widget Transparency
    By dotboy in forum Qt Programming
    Replies: 9
    Last Post: 2nd July 2009, 13:11
  3. Custom event gets not propagated to the top level widget
    By nightghost in forum Qt Programming
    Replies: 0
    Last Post: 29th January 2009, 09:06
  4. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  5. Block Widget Movement
    By shyam prasad in forum Qt Programming
    Replies: 5
    Last Post: 3rd April 2007, 18:27

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.