I have mainwindow.ui where need to use menubar and toolbar on my Windows 10OS.So I made in GUI menubar an toolbar, but when program runs they not appear.
mainwindow.ui
running mainwindow
Code of constructor is simple
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
qApp->setAttribute(Qt::AA_DontShowIconsInMenus, false);
menuBar()->setNativeMenuBar(false);
ui->setupUi(this);
this->showMaximized();
this->setMouseTracking(true);
}
What is wrong? This must work.