1

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.

  1. mainwindow.ui

  2. 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.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241

0 Answers0