Hi, I've designed a Qt app that has one toolbar in the left and two toolbars in the top (one above the other) using the designer. Using the preview option the window seems fine, but when using it with pyqt4 all toolbars get stuck one after the other.
<br><br>Im loading the ui file dynamically but also tried to use pyuic for seeing what was the code supposed to do, what i found was this:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tbImage = QtGui.QToolBar(MainWindow)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tbImage.setMovable
(True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tbImage.setObjectName(&quot;tbImage&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MainWindow.addToolBar(self.tbImage)<br>This is the code to add the toolbar to the left, as you can see it has no option to actually put it in the left.
<br><br>looking at the api i found the method initStyleOption that seems to be what im looking for, but using the following code didn&#39;t worked:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tbImage = QtGui.QToolBar(MainWindow)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tbImage.setMovable
(True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tbImage.setObjectName(&quot;tbImage&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a = QtGui.QStyleOptionToolBar()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a.toolBarArea = QtCore.Qt.LeftToolBarArea<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a.positionOfLine = QtGui.QStyleOptionToolBar.End
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.tbImage.initStyleOption(a)<br><br>in qt4.3 api initStyleOption doesn&#39;t exists.<br>Thanks<br>Hernan Rajchert<span style="font-weight: bold;"></span><b><br></b>