<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Le 11/10/11 10:39, luca72 a écrit :
<blockquote
cite="mid:e6b76f38-3f3c-4d52-a2f0-0fd9b20a138e@db5g2000vbb.googlegroups.com"
type="cite">
<pre wrap="">helo i have this form how i can install the event filter:
Class Form(QWidget, Ui_Form):
"""
Class documentation goes here.
"""
def __init__(self, parent = None):
"""
Constructor
"""
QWidget.__init__(self, parent)
self.setupUi(self)
Thanks
</pre>
</blockquote>
MainWindow.eventFilter = self.event_filter<br>
<br>
...<br>
<br>
def event_filter(self, object, event):<br>
# example: window is resized<br>
if event.type() == 14:<br>
resize()<br>
return True<br>
<br>
<br>
In your case, 'MainWindow' seems to be 'parent'<br>
<br>
<div class="moz-signature">-- <br>
Vincent V.V.<br>
<a href="https://launchpad.net/oqapy">Oqapy</a> . <a
href="https://launchpad.net/qarte+7">Qarte+7</a> . <a
href="https://launchpad.net/paqager">PaQager</a></div>
</body>
</html>