I am using Qt5 on the Windows7 platform:
Qt Creator version: v3.3.2.
Qt version 5.5.1 and MinGW 32bit.
Currently, the menu bar has:
Configuration - Reports - Help
I was looking for SO and I found this as a possible answer: Failed to hide the QMenu object QMenu :: setVisible ()? but he didn 't work ...
So, I tried to remove the help menu using:
ui->menuHelp->setVisible(false);
and:
ui->menuHelp->menuAction()->setVisible(false);
Unfortunately, both could not hide / delete the menu Help...
Please, is there any other way to do this?
[Code]:
MainWindow::MainWindow(QWidget * parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
this->setWindowFlags(this->windowFlags() & ~Qt::WindowMaximizeButtonHint);
if(!server.listen(QHostAddress("192.168.1.2"), 8001))
return;
if(true)
ui->menuHelp->menuAction()->setVisible(false);
}
source
share