[PySide] QDialogButtonBox
Frank Rueter | OHUfx
frank at ohufx.com
Tue May 22 02:59:16 CEST 2018
Thanks. I guess this has the same effect as setting the max size on the
button box in my scenario.
Cheers,
frank
On 22/05/18 12:30 PM, Tim Roberts wrote:
> Frank Rueter | OHUfx wrote:
>> I am trying to use a QHBoxLayout with a checkbox and a
>> QDialogButtonBox in it.
>>
>> ...
>>
>> However, the alignment for the checkbox is ignores and it ends up all
>> the way on the left:
>>
>>
>> I'd like it to be next to the Cancel button though.
>> I tried this with a different widget than QDialogButtonBox and I get
>> the expected result.
>> I then tried setting the sizePolicy of the button box to "minimum"
>> but to no avail.
>
> Surprisingly, it IS moving it all the way to the right, but because it
> is resizable, it's stretching the size so that it reaches to the left
> margin.
>
> The usual way to solve this is to add a QSpacerItem on the left. That
> way, the spacer item stretches to fill the space.
> --
> Tim Roberts,timr at probo.com
> Providenza & Boekelheide, Inc.
>
>
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/pyside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20180522/fdcd0db0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kjadmacdbemhfnne.png
Type: image/png
Size: 23858 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20180522/fdcd0db0/attachment.png>
More information about the PySide
mailing list