0

I'm working in my thesis project, I need to know if it's possible to "open" automatically a menu item in my QMainWindow. I mean, if my menu bar is:

    File        Help
       -Open      -About...
       -Close     -Manual
       ...        ...

How can I open the menu item and show the submenus without clicking them? Is there something like:

ui->menubar->items[0].show();

To open the "File" menu.

Thanks in advance, I really appreciate your help.

EDIT: I found how to do in this thread

Thanks

4

1 回答 1

0

QMenu popup() 应该可以解决问题。

欲了解更多信息:

http://developer.qt.nokia.com/doc/qt-4.8/qmenu.html#popup

于 2012-02-21T16:41:38.497 回答