Results 1 to 2 of 2

Thread: Right-click context menus freeze on Windows

  1. #1
    Join Date
    Oct 2010
    Location
    Florida
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Right-click context menus freeze on Windows

    I am developing a multi-threaded, (near) real-time app for Windows and Linux (using 4.6.0). Context menu requests (right-clicks) sometimes cause the app to "freeze up" on Windows (XP only, not currently targeting Windows 7). The real-time piece of the app stops updating, and I only get an "outline" of the context menu. This is not an issue on our Linux platforms. I have to move the mouse then right-click again (sometimes several times) to clear this behavior. I have also observed this behavior occasionally in QtCreator (on Windows). I have added "raise()" and "activateWindow()" calls on all context menu event handlers, but this does not seem to have affected the behavior. Has anyone else observed (and hopefully corrected) this behavior?

  2. #2
    Join Date
    Oct 2010
    Location
    Florida
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Right-click context menus freeze on Windows

    I think I found and fixed my own issue: Basically I replaced every occurrence of:

    _contextMenu->exec(event->globalPos());

    with:

    _contextMenu->popup(event->globalPos());

    The difference being that "exec()" executes the menu synchronously while "popup()" executes the menu asynchronously.

Similar Threads

  1. QGraphicsItem and Context Menus
    By SixDegrees in forum Qt Programming
    Replies: 2
    Last Post: 31st August 2010, 21:50
  2. Context Menus
    By qtoptus in forum Newbie
    Replies: 0
    Last Post: 25th June 2010, 15:18
  3. Context Menus
    By rodlbr in forum Qt Programming
    Replies: 4
    Last Post: 7th September 2009, 16:30
  4. Multiple Context Menus
    By mclark in forum Qt Programming
    Replies: 3
    Last Post: 24th December 2008, 19:55
  5. Replies: 0
    Last Post: 21st March 2008, 21:34

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.