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> self.tbImage = QtGui.QToolBar(MainWindow)<br> self.tbImage.setMovable
(True)<br> self.tbImage.setObjectName("tbImage")<br> 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't worked:<br> self.tbImage = QtGui.QToolBar(MainWindow)<br> self.tbImage.setMovable
(True)<br> self.tbImage.setObjectName("tbImage")<br> a = QtGui.QStyleOptionToolBar()<br> a.toolBarArea = QtCore.Qt.LeftToolBarArea<br> a.positionOfLine = QtGui.QStyleOptionToolBar.End
<br> self.tbImage.initStyleOption(a)<br><br>in qt4.3 api initStyleOption doesn't exists.<br>Thanks<br>Hernan Rajchert<span style="font-weight: bold;"></span><b><br></b>