<br><tt><font size=3>>On Monday 21 January 2008, [EMAIL PROTECTED] wrote:<br>
>> ...<br>
>><br>
>> >You probably want QWidget.setMouseTracking().<br>
>> ><br>
>> >Phil<br>
>><br>
>> Hm, mouseTracking is set in the textBrowser, the centralWidget
and the<br>
>> QMainWindow. Um, shall I say, I'm running under Windows XP?<br>
><br>
>You need to post a short, complete example that demonstrates the problem.<br>
><br>
>Phil<br>
</font></tt>
<br><tt><font size=3>#Here is the designer ui (ui_untitled.py):</font></tt>
<br><tt><font size=3>#----------------------------------------</font></tt>
<br><tt><font size=3># -*- coding: utf-8 -*-</font></tt>
<br>
<br><tt><font size=3># Form implementation generated from reading ui file
'untitled.ui'</font></tt>
<br><tt><font size=3>#</font></tt>
<br><tt><font size=3># Created: Mon Jan 21 14:38:34 2008</font></tt>
<br><tt><font size=3># by: PyQt4 UI code generator
4.3.3</font></tt>
<br><tt><font size=3>#</font></tt>
<br><tt><font size=3># WARNING! All changes made in this file will be lost!</font></tt>
<br>
<br><tt><font size=3>from PyQt4 import QtCore, QtGui</font></tt>
<br>
<br><tt><font size=3>class Ui_MainWindow(object):</font></tt>
<br><tt><font size=3> def setupUi(self, MainWindow):</font></tt>
<br><tt><font size=3> MainWindow.setObjectName("MainWindow")</font></tt>
<br><tt><font size=3> MainWindow.resize(QtCore.QSize(QtCore.QRect(0,0,293,250).size()).expandedTo(MainWindow.minimumSizeHint()))</font></tt>
<br><tt><font size=3> MainWindow.setMouseTracking(True)</font></tt>
<br>
<br><tt><font size=3> self.centralwidget = QtGui.QWidget(MainWindow)</font></tt>
<br><tt><font size=3> self.centralwidget.setMouseTracking(True)</font></tt>
<br><tt><font size=3> self.centralwidget.setObjectName("centralwidget")</font></tt>
<br>
<br><tt><font size=3> self.textBrowser = QtGui.QTextBrowser(self.centralwidget)</font></tt>
<br><tt><font size=3> self.textBrowser.setGeometry(QtCore.QRect(10,10,256,192))</font></tt>
<br><tt><font size=3> self.textBrowser.setMouseTracking(True)</font></tt>
<br><tt><font size=3> self.textBrowser.setObjectName("textBrowser")</font></tt>
<br><tt><font size=3> MainWindow.setCentralWidget(self.centralwidget)</font></tt>
<br>
<br><tt><font size=3> self.statusbar = QtGui.QStatusBar(MainWindow)</font></tt>
<br><tt><font size=3> self.statusbar.setObjectName("statusbar")</font></tt>
<br><tt><font size=3> MainWindow.setStatusBar(self.statusbar)</font></tt>
<br>
<br><tt><font size=3> self.retranslateUi(MainWindow)</font></tt>
<br><tt><font size=3> QtCore.QMetaObject.connectSlotsByName(MainWindow)</font></tt>
<br>
<br><tt><font size=3> def retranslateUi(self, MainWindow):</font></tt>
<br><tt><font size=3> MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow",
"MainWindow", None, QtGui.QApplication.UnicodeUTF8))</font></tt>
<br>
<br><tt><font size=3># and here the main app</font></tt>
<br><tt><font size=3>#----------------------</font></tt>
<br><tt><font size=3>#!/usr/bin/env python</font></tt>
<br>
<br><tt><font size=3>import sys</font></tt>
<br><tt><font size=3>from PyQt4 import QtCore, QtGui</font></tt>
<br><tt><font size=3>from ui_untitled import Ui_MainWindow</font></tt>
<br>
<br><tt><font size=3>eventTypes = {</font></tt>
<br><tt><font size=3> 0: "None",</font></tt>
<br><tt><font size=3> 1: "Timer",</font></tt>
<br><tt><font size=3> 2: "MouseButtonPress",</font></tt>
<br><tt><font size=3> 3: "MouseButtonRelease",</font></tt>
<br><tt><font size=3> 4: "MouseButtonDblClick",</font></tt>
<br><tt><font size=3> 5: "MouseMove",</font></tt>
<br><tt><font size=3> 6: "KeyPress",</font></tt>
<br><tt><font size=3> 7: "KeyRelease",</font></tt>
<br><tt><font size=3> 8: "FocusIn",</font></tt>
<br><tt><font size=3> 9: "FocusOut",</font></tt>
<br><tt><font size=3> 10: "Enter",</font></tt>
<br><tt><font size=3> 11: "Leave",</font></tt>
<br><tt><font size=3> 12: "Paint",</font></tt>
<br><tt><font size=3> 13: "Move",</font></tt>
<br><tt><font size=3> 14: "Resize",</font></tt>
<br><tt><font size=3> 17: "Show",</font></tt>
<br><tt><font size=3> 18: "Hide",</font></tt>
<br><tt><font size=3> 19: "Close",</font></tt>
<br><tt><font size=3> 21: "ParentChange",</font></tt>
<br><tt><font size=3> 24: "WindowActivate",</font></tt>
<br><tt><font size=3> 25: "WindowDeactivate",</font></tt>
<br><tt><font size=3> 26: "ShowToParent",</font></tt>
<br><tt><font size=3> 27: "HideToParent",</font></tt>
<br><tt><font size=3> 31: "Wheel",</font></tt>
<br><tt><font size=3># some deleted ...</font></tt>
<br><tt><font size=3> 178: "ContentsRectChange"</font></tt>
<br><tt><font size=3>}</font></tt>
<br>
<br>
<br>
<br><tt><font size=3>class MainWindowForm(QtGui.QMainWindow):</font></tt>
<br><tt><font size=3> def __init__(self, parent=None):</font></tt>
<br><tt><font size=3> QtGui.QMainWindow.__init__(self)</font></tt>
<br>
<br><tt><font size=3> self.ui = Ui_MainWindow()</font></tt>
<br><tt><font size=3> self.ui.setupUi(self)</font></tt>
<br><tt><font size=3> self.ui.textBrowser.installEventFilter(self)</font></tt>
<br><tt><font size=3> # end def __init__</font></tt>
<br>
<br><tt><font size=3> def eventFilter(self, obj, ev):</font></tt>
<br><tt><font size=3> if eventTypes.has_key(ev.type()):</font></tt>
<br><tt><font size=3> et = eventTypes[ev.type()]</font></tt>
<br><tt><font size=3> else:</font></tt>
<br><tt><font size=3> et = "unknown"</font></tt>
<br><tt><font size=3> # end if</font></tt>
<br><tt><font size=3> print "%s: %s" % (obj, et)</font></tt>
<br><tt><font size=3> return True</font></tt>
<br><tt><font size=3> # end def eventFilter</font></tt>
<br>
<br><tt><font size=3> def mouseMoveEvent(self, ev):</font></tt>
<br><tt><font size=3> print "centralwidget mouse move"</font></tt>
<br>
<br><tt><font size=3># end class MainWindowForm</font></tt>
<br>
<br><tt><font size=3>if __name__ == "__main__":</font></tt>
<br><tt><font size=3> app = QtGui.QApplication(sys.argv)</font></tt>
<br><tt><font size=3> win = MainWindowForm()</font></tt>
<br><tt><font size=3> win.show()</font></tt>
<br><tt><font size=3> sys.exit(app.exec_())</font></tt>
<br><tt><font size=3># end if</font></tt>
<br>
<br>
<br><tt><font size=3>Martin</font></tt>
<br>