I have an application with a QMainWindow subclass which has a menubar at the top. I have a child widget which is in a dockwidget. The child widget has a QTextEdit in it. It is organized with QVBoxLayout. The problem is that I can't get the menubar to show up.
I tried this code from qmainwindow.cpp (not sure the const_cast stuff is necessary)
Qt Code:
MyWidget *self = const_cast<MyWidget*>(this);To copy to clipboard, switch view to plain text mode
And then:
Qt Code:
mainLayout->setMenuBar(mMenuBar); mainLayout->addWidget(mTextEdit);To copy to clipboard, switch view to plain text mode
But it doesn't show up.
Bookmarks