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
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*);
Last edited by Zlatomir; 5th June 2010 at 23:13.
QMainWindow needs a central widget. So you can set your layout to a QWidget, and set it as centralWidget of the QMainWindow.
Bookmarks