Results 1 to 5 of 5

Thread: Advise sought for implementation of hoverEvent in QWidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Advise sought for implementation of hoverEvent in QWidget

    You'll need to decide what you mean by "stopped moving" - how long does the mouse have to remain motionless to qualify? And is just being within the hot zone sufficient, or must the mouse be completely motionless within that area?

    Anyway, one approach would be to use a QTimer set to your timeout interval, and reset the timer with each mouse move. If the timer ever times out, it'll emit a signal which you can connect to your popup dialog.

    Personally, I think it would be better - and simpler - to just pop up the dialog when the mouse is within the hot zone, and ignore timing and whether the mouse has "stopped." But this is a rough guide if you decide to proceed.

  2. The following user says thank you to SixDegrees for this useful post:

    TorAn (31st May 2010)

Similar Threads

  1. Replies: 2
    Last Post: 3rd May 2010, 12:18
  2. advise sought on TreeView model design
    By QPlace in forum Qt Programming
    Replies: 0
    Last Post: 25th June 2009, 14:36
  3. Replies: 6
    Last Post: 25th February 2008, 21:18
  4. QGraphicsItem HoverEvent Doubt
    By arjunasd in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2007, 17:40
  5. Help sought on console + GUI Integration...
    By mysearch05 in forum Newbie
    Replies: 7
    Last Post: 28th January 2006, 14:41

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.