Related to QMessageBox
Julio César Gázquez
julio at mebamutual.com
Thu Jun 10 18:17:12 BST 2021
El 10/6/21 a las 14:12, Sahej singh escribió:
> Respected sir,
> Can you please help me to rectify the following error,
> line 40, in close_application
> choice = QtGui.QMessageBox.question(self, 'Extract!' ,"Get into
> the chopper?",QtGui.QMessageBox.Yes | QtGui.MessageBox.No
> <http://QtGui.MessageBox.No>)
> AttributeError: 'module' object has no attribute 'MessageBox'
>
Hi.
In Qt5, QMessageBox (and all the QWidget related classes) were moved to
QtWidgets.
So you must replace QtGui.QMessageBox with QtWidgets.QMessageBox.
Best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210610/ece9035c/attachment.htm>
More information about the PyQt
mailing list