Hi,
How to add a menu bar to fullscreen Qmainwindow?
thanks
Ram
Hi,
How to add a menu bar to fullscreen Qmainwindow?
thanks
Ram
Create a menu bar widget and add it to main window's layout.
what exactly is the problem? does your menu disappear on full screen?
yes it appears without problem in the normal window but with the full it didn't
thanks
how did you add your menubar? using QMainWindow::menuBar()?
thanks nish,
i'm using this
it is working fine in case of normal screen but on the fullscreen it is shown in the top of screenQt Code:
fileMenu = menuBar()->addMenu(tr("&File")); exit->setStatusTip(tr("exit now")); // menuBar()->addAction(exit); fileMenu->addAction(exit); connect(exit, SIGNAL(triggered()), this, SLOT(close())); menuBar1->addMenu(fileMenu);To copy to clipboard, switch view to plain text mode
all what i need is to make menu bar (options-back) on the normal position of the bottom of screen
thanks
Ram
menuBar() creates AND puts it in the default layout of mainwindow at the top. Do not manipulate it. Unfortunately it always sits on the top of the window.
thanks nish,
i solved it right now by writing this snippet code and it shows me the device softkeys with fullscreen mode
but the problem now is how to replace the "options-exit" menu with "options-back" or "back" soft key onlyQt Code:
fileMenu = menuBar()->addMenu(tr("&File")); fileMenu->addAction(exit); Qt::WindowFlags flags; flags |= Qt::WindowSoftkeysVisibleHint; flags &= ~Qt::WindowSoftkeysRespondHint; setWindowFlags(flags); // Hides visible window showFullScreen();To copy to clipboard, switch view to plain text mode
Ram
now read your first post again... how in this great world we will know that you were talking about a mobile application? Qt is not just for mobile.
i'm so sorry about confusion
Bookmarks