Try; spacer = QWidget() spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) toolBar.addWidget(spacer) # Then your button to be right-aligned
Taken from http://www.ffuts.org/blog/right-aligning-a-button-in-a-qtoolbar/ 2009/5/11 Peter Georges <[email protected]>: > I have a QToolBar in my application and I want the last button i add to the > toolbar to be positioned to the right. What is the ideal way to do that? Is > there some sort of way I can add a 'stretching' widget to push the last > button all the way over? > > Cheers > _______________________________________________ > PyQt mailing list [email protected] > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
