[win32] adding function for hiding MenuBar. Usage: rhoconfig.txt < "w32_hide_menu_bar = 1"
@@ -74,14 +74,10 @@ QMenuBar* QtMainWindow::createMenu() {
QMenuBar * menuBar = new QMenuBar(this);
-
QMenu *mMain = new QMenu("Main", this);
- //mMain->addAction("Exit", this, SLOT(on_actionExit_triggered()));
mMain->addAction("Exlt", this, SLOT(on_actionExit_triggered()));
menuBar->addMenu(mMain);
- //if (menuMain == NULL) {
menuMain = mMain;
- //}
#ifndef OS_WINDOWS_DESKTOP
QMenu * menuSimulate = new QMenu("Simulate", this);
@@ -98,7 +94,6 @@ QMenuBar* QtMainWindow::createMenu() {
menuBar->addMenu(menuSimulate);
#endif
-
QMenu * menuHelp = new QMenu("Help", this);
//menuHelp->addAction("About", this, SLOT(on_actionAbout_triggered()));
menuHelp->addAction("Info", this, SLOT(on_actionAbout_triggered()));
@@ -117,9 +112,8 @@ QtMainWindow::QtMainWindow(QWidget *parent) : QMainWindow(parent), mainWindowCal
if (RHOCONF().getBool("start_maximized")){
setWindowState(windowState() | Qt::WindowMaximized);
}
- createMenu();
-currentThreadId = QThread::currentThreadId();//this->thread()->currentThreadId();
+ currentThreadId = QThread::currentThreadId();
#if !defined(RHODES_EMULATOR)
QPixmap icon(QCoreApplication::applicationDirPath().append(QDir::separator()).append("icon.png"));
@@ -174,8 +168,6 @@ currentThreadId = QThread::currentThreadId();//this->thread()->currentThreadId()
QObject::connect(webView, SIGNAL(urlChanged(QUrl)), this, SLOT(on_webView_urlChanged(QUrl)));
verticalLayout->addWidget(webView);
-
-
connect(this, SIGNAL(navigate(QString,int)), this,
SLOT(slotNavigate(QString,int)), Qt::QueuedConnection);
@@ -246,6 +238,9 @@ currentThreadId = QThread::currentThreadId();//this->thread()->currentThreadId()
}
setMenuBar(createMenu());
+ if (RHOCONF().getInt("w32_hide_menu_bar")){
+ this->menuBar()->hide();
+ }
}
QtMainWindow::~QtMainWindow()
