Alright, I'm a little new to Qt....
I have a QGridLayout with all of my content in it.. How could I apply it to a QMainWindow?
Thanks :)
Printable View
Alright, I'm a little new to Qt....
I have a QGridLayout with all of my content in it.. How could I apply it to a QMainWindow?
Thanks :)
QMainWindow has a setLayout(QLayout*) member function.
Or alternate way is to use QWidget with parent 0 as a main window, and pass the pointer as a parameter to the creation of layout (or use setLayout(...))
or add the widget, as central widget for QMainWindow, with setCentralWidget(QWidget*);
QMainWindow needs a central widget. So you can set your layout to a QWidget, and set it as centralWidget of the QMainWindow.