[PySide] QDialogButtonBox
Frank Rueter | OHUfx
frank at ohufx.com
Tue May 22 02:27:00 CEST 2018
And as always the solution occurs to me right after hitting the send button.
I had to setMaximumWidth() on the button box which apparently defaults
to the parent widgets width or something.
On 22/05/18 12:19 PM, Frank Rueter | OHUfx wrote:
>
> Hi all,
>
> I am trying to use a QHBoxLayout with a checkbox and a
> QDialogButtonBox in it.
>
> |bottomLayout = QtWidgets.QHBoxLayout() self.snapshotWidget =
> QtWidgets.QCheckBox('take sequence snapshots') self.btnBox =
> QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Apply |
> QtWidgets.QDialogButtonBox.Cancel)
> bottomLayout.addWidget(self.snapshotWidget)
> bottomLayout.addWidget(self.btnBox)
> bottomLayout.setAlignment(self.snapshotWidget, QtCore.Qt.AlignRight) #
> has no effect |
>
> 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.
>
> What am I missing?
>
> Cheers,
> frank
>
>
> --
>
> ohufxLogo 50x50 <http://www.ohufx.com>
> *vfx compositing <http://ohufx.com/compositing.html> | *workflow
> customisation and consulting <http://ohufx.com/customising.html>* *
> *<http://ohufx.com/compositing.html>*
> <http://www.nukepedia.com/nubridge>
>
>
> Your gateway to over 1,000 free tools... right inside of Nuke
> <http://www.nukepedia.com/nubridge>
>
>
>
> _______________________________________________
> 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/9d0a63f3/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/9d0a63f3/attachment.png>
More information about the PySide
mailing list