<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
overwrite the closeEvent
(<a class="moz-txt-link-freetext" href="http://riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html#closeEvent">http://riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html#closeEvent</a>)
of your main window. Alternatively you can set the WA_DeleteOnClose
flag on your widget
(<a class="moz-txt-link-freetext" href="http://riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html#setAttribute">http://riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html#setAttribute</a>)
which should terminate your threads if their parent is set to that
window.<br>
<br>
Philip<br>
<br>
On 12/22/2010 09:49 AM, Luke Taylor wrote:
<blockquote cite="mid:COL110-W1140592F2955D5E330B3E5D11B0@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
Hi everyone,<br>
<br>
I have an application with several threads, one of which is a PyQT
GUI, when I click on the close button, the PyQT GUI closes but the
rest of the application keeps running, I would like to be able to
intercept the close button event and force the whole application
to quit. Does anybody know how I might do this?<br>
<br>
Thanks for time and help,<br>
<br>
Luke<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
PyQt mailing list <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
</blockquote>
<br>
</body>
</html>