Ok,keep in mind that you have to call the widget's setLayout() function;
Here's an example:
1.Create a new ui class in QtCreator called MyWidget
2.Open the ui file,drag a layout into MyWidget,name it "myLayout".
3.Add stuffs to myLayout.
4.In the constructor of MyWidget,call setLayout():
Qt Code:
MyWidget::MyWidget() { ui.setupUi(this); setLayout(ui.myLayout); }To copy to clipboard, switch view to plain text mode
Bookmarks