[PyKDE] setMouseTracking

Maxim Olivier-Adlhoch maximo at meteorstudios.com
Wed Apr 9 21:23:00 BST 2003


Hello all,


I am new to Qt and python too... be gentle, please ;-)

I am pretty knowleged about REBOL and many other languages, so python is pretty easy to assimilate.

I have been fiddling around with pyqt , using the QCanvas in order to feel its power (I must say I like it a lot so far :-)


but as it always happens in programming, I have stumbled on a enigma... I cannot get pyQt to give me straight mouse moves.  I want to be able to highlight stuffed based on cursor position, and well, you can't really do that with any of the mouse buttons pressed ... so:

I tried calling  myQCanvasView.setMouseTrackingFlag(1)

and I'm not getting any more messages than before...

I even tried snooping the events in an eventFilter() class attached to the myQCanvasView and there are never any more mouse moves which pass by, just the normal and default mouse messages.

I tried calling myApp.setGlobalMouseTracking(1) and that does not help...


can anyone tell me what I must do more, for mouse events to reach my contentsMouseMove() method?

ps I am using the canvas.py example script , so you can explain it with regards to that nice piece of code...



many thanks ;-)


-max
-----------
meteor Studios, T.D.
-----------
"Never Argue with an idiot. They will bring you down to their level and beat you with experience"




More information about the PyQt mailing list