[PyQt] Moving button to the right side edge of a QToolBar
Peter Georges
peterg at al.com.au
Tue May 12 01:43:24 BST 2009
That works perfectly
Thanks!
On 12/05/09 01:02, Chris M wrote:
> 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<peterg at al.com.au>:
>
>> 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 PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
>>
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090512/a4eaf3b9/attachment-0001.html
More information about the PyQt
mailing list