Strange behavior with QToolBar
-
Greetings. I hope you are doing well.
What I want to achieve:
I am trying to place an empty QToolBar to left side of my top QToolBar in my application. In the design view, it shows that the QToolBar is placed to left hand side of the other QToolBar. This is exactly what I am looking for.
Image:
Issue:
As soon as I run the application, my tool bar is positioned at the right side.
Image:
As I am not sure why this behavior is occurring, I wanted to ask for help.
Thank you for taking the time to read my question and help me.
-
Hi,
Are you doing anything in code with regard to these tool bars ?
Are you loading and saving their geometry or something similar ?
-
Are you doing anything in code with regard to these tool bars ?
No. I am currently just experimenting with the UI by using the Qt Designer, and some inline styles sheets. I have not touched the code since I began the project.
Are you loading and saving their geometry or something similar ?
No. I have no knowledge about how to accomplish this type of behavior.
Maybe this will help:
When I first started the project, as I dragged and dropped the other Widgets (QToolBars), they were all positioning themselves where I specified them to be. (Where I dropped them). However, for some reason the last QToolBar is behaving strange. Even tough I drop it to the left side of the QToolBar containing the "Copy", "Paste", and "Cut" actions, it refuses to stay there. In the designer tab it shows that it is in the correct place. However, as soon as I start the application it jumps to the right side. Can this behavior arise from it being empty and containing no actions?
-
AFAIK, the fact that it's empty should have no role with regard to the position.
Can you provide a minimal compilable example that shows this behaviour ?