Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, April 2008
How to disable menu with toolbar names on QMainWindow ?


Message 1 in thread

Hi,

I have QMainWindow with only one QToolBar on it, nothing else. No 
statusbar, no menu, no main widget, only one long toolbar.
I would like not to show a menu with the list of toolbar names that pops 
up when user press right mouse button.
How to disable/hide this menu?

Many thanks,
Vladimir

--
 [ signature omitted ] 

Message 2 in thread

Vladimir Romanovskiy wrote:
> Hi,
>
> I have QMainWindow with only one QToolBar on it, nothing else. No 
> statusbar, no menu, no main widget, only one long toolbar.
> I would like not to show a menu with the list of toolbar names that 
> pops up when user press right mouse button.
> How to disable/hide this menu?
>
> Many thanks,
> Vladimir
>
> -- 
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
Here it is:

QMainWidget * pMain;
pMain->setContextMenuPolicy(Qt::NoContextMenu);

--
 [ signature omitted ]