[PySide] QDialogButtonBox

Frank Rueter | OHUfx frank at ohufx.com
Tue May 22 02:19:22 CEST 2018


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>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20180522/4e71cff6/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/4e71cff6/attachment.png>


More information about the PySide mailing list