Hi,
quick question. Is it possible to add a qtoolbar to a mainwindow bottom area stacked on top of each other it there is already an existing toolbar? i could not find any hints in the docu.
Thank,
Marcus
Hi,
quick question. Is it possible to add a qtoolbar to a mainwindow bottom area stacked on top of each other it there is already an existing toolbar? i could not find any hints in the docu.
Thank,
Marcus
Not out of the box.
But no one is preventing you from using a QStackedWidget with QToolBars in it, and place it instead of the regular toolbar.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Thanks for your quick reply. I think I used the wrong words in my question. I did not mean stacked on top instead i meant placed on top of each other. If I use moveable toolbars i can place them on top of each other but if I initial add a one to a mainwindows toolbar area the toolbars are placed next to each other. So my question now, is it possible to place them directly on top e.g. in bottom area?
I fail to see the difference.I did not mean stacked on top instead i meant placed on top of each other.
However, it seems to me you are trying to do something the wrong way.
Maybe if you explain what it is you want to achieve, we can help you find a better way.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Ok, I try to explain it more detailed.
I have two QToolBars that I want to add at the bottom of my QMainWindow. Therefore I use the addToolBar( Qt::ToolBarArea area, QToolBar * toolbar ) function from QMainWindow with area Qt::BottomToolBarArea. The result is that the two toolbars are next to each other. What I want is that one of the toolbars is above the other one but still in the bottom area.
I can drag the toolbar to that position in my application but I want to get it directly from code.
I hope I could clarify the problem.
Best regards,
Marcus
No, I asked what you are trying to achieve, not how.
Why do you need two tool bars at the same location? this usually makes no sense.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
In my application I am using a timeline to control animations. This timeline should always be displayed at the bottom of my application. Additionally I have another toolbar which shall also be permanently displayed at the bottom of my application beneath the timeline. So I thought adding two toolbars at the bottom could be a good idea except of the problem that the two toolbars are initially placed next to each other...
I think I understand now.
Did you try insertToolBarBreak()?
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
dropkickz (27th July 2011)
Exactly what I was looking for. I guess I have not seen the wood for the trees. Thanks a lot, I feel a little bit ashamed for that simple solution!
Bookmarks