QSplitter + multiple layouts? how?
I simply want to split the window in two and use different layouts on either sides.
I have a main window and then i split it in half with a QSplitter. How can i add widgets to the left side of the splitter with a QGridLayout and add widgets to the right side using another layout? I can't add the widgets to the QGridLayout and then add the QGridLayout to the splitter since the layout is not a widget and the splitter does not have a addWidget function... Any help would be much appreciated... :)
EDIT: the splitter does have an addWidget function. but still... it doesn't solve my problem..
Re: QSplitter + multiple layouts? how?
simply create one wiget with a needed layout and the second one with another layout and then add these widget to a splitter using proper method (addWidget).
Re: QSplitter + multiple layouts? how?
Create two QWidget as holders for the QGridLayout. Then use setLayout( ) to add the layout to the widget.
Code:
leftSide->setLayout( leftLayout );
splitter->addWidget( leftSide );
// Add the remaining GUI elements to the layout and repeat for right side
Hope this helps.