Anchoring to Window
General and Desktop
4
Posts
2
Posters
2.2k
Views
1
Watching
-
wrote on 13 Mar 2012, 22:43 last edited by
How do I take a control say... a splitter and anchor it to the sides of the window?
So when I resize the window, the items that are in the splitter.. resize accordingly?
I see sizePolicy, minimumSize, maximumSize and geometry but not sure which one it is I should be looking at.
-
wrote on 13 Mar 2012, 22:45 last edited by
Please explain with more datails.
-
wrote on 13 Mar 2012, 23:00 last edited by
I have a QTextEdit with a QLineEdit within a Splitter.
I want both QTextEdit and QLineEdit to span the width of the client window even if the window is resized.
-
wrote on 17 Mar 2012, 17:32 last edited by
Ah figured it out.
With MainWindow.ui
Right-click on the main window
Select Layout
I chose 'Lay out in Grid'This anchored my splitter to all 4 corners so when i resize the window, the QTextEdit and QLineEdit resize properly too!
3/4