<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
El 10/6/21 a las 14:12, Sahej singh escribió:<br>
<blockquote type="cite"
cite="mid:CAPnpe+yH_n1C5HDtmi3YCXeMO2S=kgFQsJ0b4quMG8_JX+-9JA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Respected sir,
<div>Can you please help me to rectify the following error,</div>
<div>line 40, in close_application<br>
choice = QtGui.QMessageBox.question(self, 'Extract!' ,"Get
into the chopper?",QtGui.QMessageBox.Yes | <a
href="http://QtGui.MessageBox.No" moz-do-not-send="true">QtGui.MessageBox.No</a>)<br>
AttributeError: 'module' object has no attribute 'MessageBox'<br>
<br>
</div>
<img class="mailtrack-img" alt="" style="display:flex"
src="https://mailtrack.io/trace/mail/030e59eaf2b681c49d901507651452f9f0eec4ee.png?u=7295268"
moz-do-not-send="true" width="0" height="0"></div>
</blockquote>
<p>Hi.<br>
</p>
<p>In Qt5, QMessageBox (and all the QWidget related classes) were
moved to QtWidgets.</p>
<p>So you must replace QtGui.QMessageBox with QtWidgets.QMessageBox.</p>
<p>Best regards.<br>
</p>
</body>
</html>