hvw59601
31st October 2007, 16:13
Hi,
I would like an Action on a MainWindow menubar that is merely checkable but does not show a menu.
E.g when in the application example in mainwindow.cpp in createMenus() I add the following:
zoomMenu = menuBar()->addAction(tr("&Zoom"));
zoomMenu->setStatusTip(tr("Press then Left Click + rubberband + Richt Click"));
// zoomMenu->setEnabled(FALSE); //works
zoomMenu->setCheckable(TRUE);
zoomMenu->setChecked(TRUE);
Then the 'Zoom' button shows up on the menubar but it is never checked.
Anybody knows why?
I would like an Action on a MainWindow menubar that is merely checkable but does not show a menu.
E.g when in the application example in mainwindow.cpp in createMenus() I add the following:
zoomMenu = menuBar()->addAction(tr("&Zoom"));
zoomMenu->setStatusTip(tr("Press then Left Click + rubberband + Richt Click"));
// zoomMenu->setEnabled(FALSE); //works
zoomMenu->setCheckable(TRUE);
zoomMenu->setChecked(TRUE);
Then the 'Zoom' button shows up on the menubar but it is never checked.
Anybody knows why?