Related to QMessageBox
sahejjas at gmail.com
sahejjas at gmail.com
Thu Jun 10 18:19:05 BST 2021
Thanks a lot for replying but I am currently working in Qt4 so should I follow
the above procedure in Qt4 as well?
Mailtrack [https://s3.amazonaws.com/mailtrack-signature/sender_notified.gif]
[https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&]
Sender notified by
Mailtrack
[https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&]
06/10/21, 10:48:10 PM
[data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=3D]On
Thu, Jun 10, 2021 at 10:47 PM Julio César Gázquez <julio at mebamutual.com> wrote:
> 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'
[data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7]
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/5d124044/attachment.htm>
More information about the PyQt
mailing list