QListView breaks mouse move events

Tim Jansen tim at tjansen.de
Thu Aug 29 21:31:44 BST 2002


On Wednesday 28 August 2002 23:23, Tim Jansen wrote:
> Now I have a test case for krdc's "mouse move events dont work any more if
> the app created a QListView". I have found another detail: only the mouse

Ok, the test case was a little bit too simple and showed only a part of the 
problem. Many thanks to tronical for locating it (only the top-level widget 
enabled mouse tracking, but not the child, and for some reason the parent 
does not receive events when global mouse tracking is enabled). Unfortunately 
this doesnt solve krdc's problem, because in krdc all widgets do enable mouse 
tracking.

Here is a new test case that is more similar to krdc's structure:
I have a top-level widget called KRDC. KRDC contains QScrollView2, a modified 
QScrollView that ignores mouse move events (so they will be propagated to 
KRDC). The scroll view's child is KVncView. In krdc KVncView is used to 
display the VNC screen, but here it is just a simple grey widget. If your 
start the test prog, KVncView covers the grey, left half of the window. In 
the right half there is only the QScrollView. Like in the last test case, a 
QListView will be created (in KRDC::start()). It is neccessary to get the 
whole error.
All three widgets have mouse tracking enabled and implement mouseMoveEvent(). 
In the implementations they print their name with the coordinates of the 
mouse.

Under normal circumstances, when you move the mouse over the window you should 
see mouse move events from all three widgets in the left half, and mouse move 
events of the scroll view and KRDC in the right half.
What I get are only KVncView's events in the left half, and nothing at all in 
the right half. Only when the mouse button is pressed, everything works as 
expected.
When the QListView is removed, the right side works as expected. The left side 
still shows the problem.

Attached is the testcase, just edit the Makefile and change the path for KDE 
and Qt, enter make and start ./test.

bye...



-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.tar.gz
Type: application/x-tgz
Size: 1388 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20020829/9b3318c1/attachment.bin>


More information about the kde-core-devel mailing list