I have a simple Qt MainWindow:
// ui/mainwindow.hpp
class MainWindow: public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget* parent = 0);
public slots:
private:
};
// ui/mainwindow.cpp
MainWindow::MainWindow(QWidget* parent): QMainWindow(parent)
{
QMenu* menuFile = menuBar()->addMenu(tr("File"));
menuFile->addAction(tr("Some"));
}
// Application entry
int main(int argc, char* argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
I'm noticing that with Ubuntu and Unity, the menu bar is not showing on the top of the screen but instead inside the application's window.
How do I make the menu bar show up on the top of the screen?