Unsolved Breakable Layout for Buttons-bar
-
I'm Qt newbe. Now I'm trying to implement a UI with a buttons-bar. These UI breaks into new line, when the device shows the content vertically, or it shows the buttons in one or two lines, when the device shows the content horizontally.
How can I do this? Grateful for your help!edit: So if the orientation is vertically, I have f.e. 2 buttons side by side and in the next line again 2 buttons side by side, in the next line again, and so on...
Or I have 1 button, in the next line 1 button again, and so on...
If the orientation is horizontally I have 4 buttons side by side, in the next line f.e. 3 buttons or what ever... -
Hi,
Aren't you looking for QMainWindow ?
-
No, do you know f.e. Opera Browser? When you open a new tab, you have there some quick-link buttons. These buttons are in some kind of control, that allows to arrange the buttons automatically.
When the place is wide enough, you have f.e. 3 or 4 button-columns and 2 button-rows.
Otherwise you have f.e. 2 button-columns, and 4 button-rows.
Do you read me? -
Then maybe the Flow Layout Example will be of interest.
-
edit: So if the orientation is vertically, I have f.e. 2 buttons side by side and in the next line again 2 buttons side by side, in the next line again, and so on...
Or I have 1 button, in the next line 1 button again, and so on...
If the orientation is horizontally I have 4 buttons side by side, in the next line f.e. 3 buttons or what ever...