[PyQt] StandardButtonBox: move from QMainWindow to each tab

David Cortesi davecortesi at gmail.com
Thu Jan 26 15:59:39 GMT 2017

>    If I delete that QDialogButtonBox, and place OK and Cancel buttons in
> each
> notebook tab, how do I specify their default behaviors? The Properties
> Manager does not display any signals and slots for these buttons.
>    A pointer to a reference will be much appreciated.
The class QDialogButtonBox (http://doc.qt.io/qt-5/qdialogbuttonbox.html)
itself offers signals for clicked(button), accepted() i.e. OK clicked, and
rejected(), i.e. Cancel clicked.

One could create an instance of QDialogButtonBox within a widget before you
add that widget to the tabset.

Connect the appropriate signals from the specific QDialogButtonBox
instance, to the code within that widget to handle it.

I am puzzled that you would have an OK/Cancel choice permanently visible;
these are usually part of modal dialogs that you display in response to
some user issue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170126/0c8c603e/attachment.html>

More information about the PyQt mailing list