After creating a QListView mouse move events are broken

Tim Jansen tim at tjansen.de
Tue Aug 27 21:51:07 BST 2002


Hi...

I have a really strange problem in krdc. To see the symptoms of the bug:
1. connect to a system using the dialog (start krdc without arg)
2. when connected, switch to fullscreen (left button in toolbar)
3. enable toolbar autohide using the left button
4. wait two seconds until the toolbar is hidden
5. move pointer to the screen's upper border and the toolbar should come back. 
Unfortunately it doesnt, because the widget does not get any mouse move 
events, unless you press a button while moving the mouse. (Yes, i did enable 
mouse tracking)

If you start krdc with the host's name as argument it works. After a lot of 
searching it turned out that the connection dialog uses a KListView. When I 
remove the KListView, the mouse move event in the main window works. Note 
that the list view and its dialog have nothing to do with the main window.

The problem seems to be triggered by the creation of a KListView - or, 
alternatively, a QListView. A QScrollView does not cause any problems. So you 
can easily test the bug by adding the following patch:

RCS file: /home/kde/kdenetwork/krdc/main.cpp,v
retrieving revision 1.10
diff -u -p -u -r1.10 main.cpp
--- main.cpp    2002/07/12 01:01:29     1.10
+++ main.cpp    2002/08/27 20:37:59
@@ -27,6 +27,7 @@
 #include "../config.h"
 #include "main.h"

+#include <klistview.h>

 static const char *description = I18N_NOOP("Remote Desktop Connection");

@@ -96,6 +97,7 @@ int main(int argc, char *argv[])

        if (args->count() > 0) {
                QString host = args->arg(0);
+QScrollView klv( 0, "browsingView" );
                krdc = new KRDC(wm, host, quality, encodings);
                a.setMainWidget(krdc);
                QObject::connect(krdc, SIGNAL(disconnected()),

After applying this patch you can start krdc with hostname as argument, and 
you will see the error as well. So the error in the mouse move event can be 
reproduced by creating a QListView.

And here is the interesting question: what can I do? Why does QListView break 
the mouse events of other windows? Any idea?

bye...









More information about the kde-core-devel mailing list