Baffled by Designer - can't add a Splitter
Solved
Qt Creator and other tools
-
-
@Perdrix said in Baffled by Designer - can't add a Splitter:
All I want is to add a horizontal splitter bar just above the wide label with the gradient half way down.
Behind the scenes, a vertical QSplitter is like a QVBoxLayout -- it is a "container" which lets you insert widgets and layouts. The main difference is that the QSplitter automatically places horizontal splitter bars between neighbouring items but a QVBoxLayout does not.
Here's the trick:
- Select your top-level widget and click "Break Layout".
- Drag 2 "Vertical Layouts" onto your widget. They will be free-floating at this point.
- Take all the items above your wide label with the gradient and put them into the 1st Vertical Layout.
- Take all the items below your wide label with the gradient (including the label itself) and put them into the 2nd Vertical Layout.
- Select both Vertical Layouts (for example, by pressing Ctrl+A) and click "Lay Out Vertically in Splitter"
- Select your top-level widget and click "Lay Out Vertically"
-
@Perdrix said in Baffled by Designer - can't add a Splitter:
Well! That wasn't at all obvious - I think that needs some attention in the UI or the docs.
I agree.
Would you be willing to post a suggestion at https://bugreports.qt.io/ ?
-