Results 1 to 5 of 5

Thread: QMainWindow::createPopupMenu()

  1. #1
    Join Date
    Oct 2009
    Posts
    90
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QMainWindow::createPopupMenu()

    hi

    how can i destroy/hide popup created using QMainWindow::createPopupMenu() within software?

    regard
    navid

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMainWindow::createPopupMenu()

    subclass QMainWindow then reimplement createPopupMenu and return 0 or whatever you want.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Oct 2009
    Posts
    90
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QMainWindow::createPopupMenu()

    thanks

    it seems after

    Qt Code:
    1. mvMenu = createPopupMenu ();
    2. mvMenu->exec();
    To copy to clipboard, switch view to plain text mode 

    application go freeze and wait to i do click anywhere to disappear popup (and then continue ).

    i want to it be done using software. so i must do it {mvMenu =0;} in another thread?

  4. #4
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMainWindow::createPopupMenu()

    you can't access to GUI from another thread directly. you should use signal/slots or custom events.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  5. #5
    Join Date
    Oct 2009
    Posts
    90
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QMainWindow::createPopupMenu()

    yes,

    but this will be a complicated solution. i look for a simple one.

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.