Unsolved Break Layout broken ?
-
@David-King said in Break Layout broken ?:
I find the Qt requirement to have to 'Break Layout' to add elements a bit frustration.
You don't need to break a layout to add a new item.
Just drag the new item onto your existing layout, and the item will be inserted into the layout.
-
adding to @JKSH , when dragging over a layout, it shows a blueline to
show where it will be inserted if dropped. -
Ah, but only for 'leaf' items, within a layout.
But which I mean, I can copy Widget 2, and paste onto Horz Layout fine:
Horz Layout
Widget 1
Widget 2I then get:
Horz Layout
Widget 1
Widget 2
Widget 2_2But if I have eg the following, I can't copy Vert Layout, and paste onto Horz Layout:
Horz Layout
Vert Layout
Widget 1
Widget 2So I can't get the following.
Horz Layout
Vert Layout
Widget 1
Widget 2
Vert Layout_2
Widget 1_2
Widget 2_2At least, not without doing a Break Layout on Horz Layout first, to give me:
Vert Layout
Widget 1
Widget 2I can then copy-paste Vert Layout, to give me:
Vert Layout_2
Widget 1_2
Widget 2_2I can then multi-select Vert Layout, and Vert Layout_2, and choose layout horizontally, to reinstate the layout.
Problem is, after doing the above, my layout is broken, with all my Horz Layouts (I have 4 so far), laying on top of one other, all at the top of the QDialog.
How do I know that Break Layout is needed in the scenario described ?
Because Qt tells me so, via a dialogue it displays, saying that I need to do a Break Layout as described
On my list, to give boxgrids a try, to see if I get better mileage with..
Best regards,
David
-
Hi
If you want to clone existing layouts ( to get more)
Hold down CTRL and drag to clone the selection. (layout and all) -
Ah, the forum has removed my indenting. Hope makes sense still. Intention was eg:
Horz Layout
indent Vert Layout
indent indent Widget 1
indent indent Widget 2Ie, nested layouts
-
Hi
You can drag the layouts with CTRL
-
Yo !
Thank you so much mrjj for CTRL drag !
I had to be careful I dropped in the right place, but it worked :-)
I'm sure CTRL drag mention is somewhere in the excellent Qt documentation -
@David-King
One thing i was like 2 years to discover.
You can drag a selection from the Form to the Widget list.
And then you can have it there as template. ( in the left side list, bottom) -
Thanks for the tip !
So is this post SOLVED I wonder ?
Well it's worked around, for sure, with CTRL-dragStill seems buggish that the layout is broken by a Break Layout, then a reversing of that
-
@David-King
Well, depending on what you put in layout and kind of stuff will happen
when you break it.
It could be a bug but it does sounds normal to me.
The red layouts might become the size of what ever is it them and its minimumsize etc.