<br><tt><font size=2>>> Hi,<br>
>><br>
>> I'm trying to get a mouseMoveEvent from a QTextBrowser in a centralwidget<br>
>> of a QMainWindow. I can get mouseMoveEvents of the centralwidget
but I<br>
>> don#t seem to be able to get them from the textBrowser. I tried
none, one<br>
>> and both of commented line but nothing helped...<br>
>><br>
>> Can anyone give me hint?<br>
>><br>
>> class MainWindowForm(QtGui.QMainWindow):<br>
>> def __init__(self, parent=None):<br>
>> QtGui.QMainWindow.__init__(self)<br>
>><br>
>> self.ui = Ui_MainWindow()<br>
>> self.ui.setupUi(self)<br>
>> #self.connect( self.ui.textBrowser,<br>
>> QtCore.SIGNAL("mouseMoveEvent(QMouseEvent *)"),<br>
>> self.on_textBrowser_mouseMoveEvent)<br>
>><br>
>> #@QtCore.pyqtSignature("QMouseEvent *")<br>
>> def on_textBrowser_mouseMoveEvent(self, e):<br>
>> print "textBrowser mouse move"<br>
>><br>
>> def mouseMoveEvent(self, ev):<br>
>> print "centralwidget mouse move"<br>
>> ---<br>
><br>
>Events aren't signals. You either need to sub-class QTextBrowser and
<br>
>reimplement mouseMoveEvent() (as you have done for QMainWindow) or
install an <br>
>event filter.<br>
></font></tt>
<br><tt><font size=2>Thanks for that, but as usual for one answer there
come more questions :-)</font></tt>
<br>
<br><tt><font size=2>When I install an eventfilter on the textBrowser I
get many events like ToolTip but very few MouseMoves. In fact I get only
MouseMove events immediately after the mouse enters or before it leaves
the textBrowser. </font></tt>
<br>
<br><tt><font size=2>Funny is that I get MouseButtonDblClick events with
the middle and right button but not with the left button.</font></tt>
<br>
<br><tt><font size=2>In contrast to that, when I use a sub-class of textBrowser
I think I get all MouseMove events, but sub-classing objects, when I use
the designer is somewhat - hm, ugly - because you don't see it in designer.</font></tt>
<br>
<br><tt><font size=2>Martin Hammer</font></tt>
<br>
<br>