0

I create form in the qt designer. The main widget is QMainWindow. In the property of the toolbar I set up allowedAreas to left, remove checkboxes for movable and floatable properties, set orientation as vertical.

But it still displayed as horizontal :( How to make it vertical?

PS: its question not for launch, but for visualizing in the qt designer

AeroSun
  • 2,401
  • 2
  • 23
  • 46
  • 1
    Does this answer your question? [Vertical QToolBar from MainWindow](https://stackoverflow.com/questions/17327838/vertical-qtoolbar-from-mainwindow) – rbaleksandar Mar 13 '20 at 14:34
  • @eyllanesc I think closing this question is premature. I believe it's about how a form is visualized inside the Designer and not when you launch an application that uses it. From the question now I can see (hope I'm right) that only the form is mentioned. And indeed even with the orientation set to vertical it is still being displayed as horizontal. – rbaleksandar Mar 13 '20 at 14:40
  • @rbaleksandar, yes, the question not for launch but for visualized in the qt designer – AeroSun Mar 13 '20 at 14:43
  • It's not possible as far as I know (my Designer knowledge is quite rusty). You can use Tools->Form Editor->Preview to "launch" the form and manually drag the toolbar to one of the sides of the window to make it vertical and see how your toolbar components look like. I remember having this problem when I was playing around with the Plug&Pain Qt example and wanted to automatically change the orientation of the icons depending on whether the toolbar was horizontal or vertical. One more reason to prefer writing the code instead of using UI forms. :D – rbaleksandar Mar 13 '20 at 14:53

1 Answers1

1

In the Designer the toolbar will remain horizontal even when you've set the orientation to vertical as you have discovered.

The only easy way is to use the preview feature. Go to Tools -> Form Editor -> Preview to launch the form. From there you can drag it to one side of the window to make it vertical. This is at least my personal experience with the designer but I haven't used it in like 8-10 years. Apparently this "issue" hasn't been resolved or the solution is still well hidden. :D

rbaleksandar
  • 8,713
  • 7
  • 76
  • 161