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
[email protected]
http://lists.qt-project.org/mailman/listinfo/pyside

_______________________________________________
PySide mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to