Hi,
I am trying to test the Dials Multitouch example which comes along with Qt. I am not sure is the issue in my setup, touch screen or Qt. I am facing exactly same issue (well partially) described here
Here is my project setup.
Qt 4.6.2
Qt Creator 1.3.1
Win 7 32 bit OS
Hp Compaq L2105tm Multitouch Monitor (supports 2 touches)
I am able to compile and run the application with following issues.
Firstly I have to add in main.cpp of the example (to receive multitouch event even for the first time)
QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
To copy to clipboard, switch view to plain text mode
In release mode I can rotate two knobs only for the first time for each knob.
Usecases
Rotate knb1 knb2 -> works fine first time
Rotate knb1 knb2 again -> only one knob will rotate.
Rotate knb3 knb4 -> works fine since these knobs are rotated for the first time.
Now any combination of knobs between 1-4 will not work as expected. Only one knob is rotated even if I try to rotate two knobs.
In debug mode all the above cases work fine, i.e I can rotate any combination of two knobs any number of times (70% of times). Sometimes debug build is also not working as expected.
After digging into the issue for two days I found
(1) that in case of failures the touch event is directly received by the knobs and in case of correct behavior the touch event is first received by containing widget of knobs(int this case its QWidget) and from there the event is propagated to respective knob.
(2) In case of correct behavior the code returns from
if (!isActive())
{
return;
}
if (!isActive())
{
return;
}
To copy to clipboard, switch view to plain text mode
which is at around line 230 in qt\src\gui\accessible\qaccessible_win.cpp. While in case of incorrect behavior the code goes further down in that function.
In case if its of any help, here goes the stack trace in case of correct behavior
0 QDial::mouseMoveEvent qdial.
cpp 349 0x00a29e70
1 QWidget::event qwidget.
cpp 7983 0x006dc938
3 QDial::event qdial.
cpp 508 0x00a2a2a0
4 QApplicationPrivate::notify_helper qapplication.cpp 4300 0x00692520
8 QWidget::event qwidget.
cpp 8431 0x006ddbcf
10 QDial::event qdial.
cpp 508 0x00a2a2a0
11 QApplicationPrivate::notify_helper qapplication.cpp 4300 0x00692520
15 QApplicationPrivate::translateRawTouchEvent qapplication.cpp 5670 0x006941fc
16 QApplicationPrivate::translateTouchEvent qapplication_win.cpp 4067 0x006fa075
17 QtWndProc@16 qapplication_win.cpp 1680 0x006f2e8f
18 USER32!IsWindowVisible C:\Windows\system32\user32.dll 0 0x777f86ef
19 ?? 0 0x00060534
20 ?? 0 0x00000240
0 QDial::mouseMoveEvent qdial.cpp 349 0x00a29e70
1 QWidget::event qwidget.cpp 7983 0x006dc938
2 QAbstractSlider::event qabstractslider.cpp 956 0x009fbe56
3 QDial::event qdial.cpp 508 0x00a2a2a0
4 QApplicationPrivate::notify_helper qapplication.cpp 4300 0x00692520
5 QApplication::notify qapplication.cpp 3865 0x00690723
6 QCoreApplication::notifyInternal qcoreapplication.cpp 704 0x6a1fd302
7 QCoreApplication::sendEvent qcoreapplication.h 215 0x00ce6f9e
8 QWidget::event qwidget.cpp 8431 0x006ddbcf
9 QAbstractSlider::event qabstractslider.cpp 956 0x009fbe56
10 QDial::event qdial.cpp 508 0x00a2a2a0
11 QApplicationPrivate::notify_helper qapplication.cpp 4300 0x00692520
12 QApplication::notify qapplication.cpp 4265 0x006923a0
13 QCoreApplication::notifyInternal qcoreapplication.cpp 704 0x6a1fd302
14 QCoreApplication::sendSpontaneousEvent qcoreapplication.h 218 0x00ce6f4a
15 QApplicationPrivate::translateRawTouchEvent qapplication.cpp 5670 0x006941fc
16 QApplicationPrivate::translateTouchEvent qapplication_win.cpp 4067 0x006fa075
17 QtWndProc@16 qapplication_win.cpp 1680 0x006f2e8f
18 USER32!IsWindowVisible C:\Windows\system32\user32.dll 0 0x777f86ef
19 ?? 0 0x00060534
20 ?? 0 0x00000240
To copy to clipboard, switch view to plain text mode
Stack trace in case of incorrect behavior
0 QWidgetPrivate::registerTouchWindow qwidget_win.cpp 2050 0x0096e706
1 QWidgetPrivate::create_sys qwidget_win.cpp 494 0x00968781
2 QWidget::create qwidget.
cpp 1319 0x0092ba61
3 QWidgetPrivate::createWinId qwidget.cpp 2310 0x0092f84e
4 QWidget::setAttribute qwidget.
cpp 10392 0x00940f38
5 QWidget::winId qwidget.
cpp 2281 0x0092f63a
6 QAccessible::updateAccessibility qaccessible_win.
cpp 286 0x00db2145
10 QDial::mouseMoveEvent qdial.
cpp 356 0x00c89ef6
11 QWidget::event qwidget.
cpp 7983 0x0093c938
13 QDial::event qdial.
cpp 508 0x00c8a284
14 QApplicationPrivate::notify_helper qapplication.cpp 4300 0x008f2520
18 QWidget::event qwidget.
cpp 8430 0x0093dbb3
20 QDial::event qdial.
cpp 508 0x00c8a284
21 QApplicationPrivate::notify_helper qapplication.cpp 4300 0x008f2520
25 QApplicationPrivate::translateRawTouchEvent qapplication.cpp 5670 0x008f41fc
26 QApplicationPrivate::translateTouchEvent qapplication_win.cpp 4067 0x0095a059
27 QtWndProc@16 qapplication_win.cpp 1680 0x00952e73
28 USER32!IsWindowVisible C:\Windows\system32\user32.dll 0 0x777f86ef
29 ?? 0 0x00020362
30 ?? 0 0x00000240
31 USER32!IsWindowVisible C:\Windows\system32\user32.dll 0 0x777f8876
32 qt_is_translatable_mouse_event qapplication_win.cpp 1395 0x009520dd
33 USER32!IsWindowVisible C:\Windows\system32\user32.dll 0 0x777f89b5
34 ?? 0 0x00000000
0 QWidgetPrivate::registerTouchWindow qwidget_win.cpp 2050 0x0096e706
1 QWidgetPrivate::create_sys qwidget_win.cpp 494 0x00968781
2 QWidget::create qwidget.cpp 1319 0x0092ba61
3 QWidgetPrivate::createWinId qwidget.cpp 2310 0x0092f84e
4 QWidget::setAttribute qwidget.cpp 10392 0x00940f38
5 QWidget::winId qwidget.cpp 2281 0x0092f63a
6 QAccessible::updateAccessibility qaccessible_win.cpp 286 0x00db2145
7 QAbstractSlider::setValue qabstractslider.cpp 539 0x00c5b49a
8 QAbstractSlider::triggerAction qabstractslider.cpp 631 0x00c5b6fd
9 QAbstractSlider::setSliderPosition qabstractslider.cpp 499 0x00c5b397
10 QDial::mouseMoveEvent qdial.cpp 356 0x00c89ef6
11 QWidget::event qwidget.cpp 7983 0x0093c938
12 QAbstractSlider::event qabstractslider.cpp 956 0x00c5be3a
13 QDial::event qdial.cpp 508 0x00c8a284
14 QApplicationPrivate::notify_helper qapplication.cpp 4300 0x008f2520
15 QApplication::notify qapplication.cpp 3865 0x008f0723
16 QCoreApplication::notifyInternal qcoreapplication.cpp 704 0x6a1fd302
17 QCoreApplication::sendEvent qcoreapplication.h 215 0x00f46f7e
18 QWidget::event qwidget.cpp 8430 0x0093dbb3
19 QAbstractSlider::event qabstractslider.cpp 956 0x00c5be3a
20 QDial::event qdial.cpp 508 0x00c8a284
21 QApplicationPrivate::notify_helper qapplication.cpp 4300 0x008f2520
22 QApplication::notify qapplication.cpp 4265 0x008f23a0
23 QCoreApplication::notifyInternal qcoreapplication.cpp 704 0x6a1fd302
24 QCoreApplication::sendSpontaneousEvent qcoreapplication.h 218 0x00f46f2a
25 QApplicationPrivate::translateRawTouchEvent qapplication.cpp 5670 0x008f41fc
26 QApplicationPrivate::translateTouchEvent qapplication_win.cpp 4067 0x0095a059
27 QtWndProc@16 qapplication_win.cpp 1680 0x00952e73
28 USER32!IsWindowVisible C:\Windows\system32\user32.dll 0 0x777f86ef
29 ?? 0 0x00020362
30 ?? 0 0x00000240
31 USER32!IsWindowVisible C:\Windows\system32\user32.dll 0 0x777f8876
32 qt_is_translatable_mouse_event qapplication_win.cpp 1395 0x009520dd
33 USER32!IsWindowVisible C:\Windows\system32\user32.dll 0 0x777f89b5
34 ?? 0 0x00000000
To copy to clipboard, switch view to plain text mode
Note:
The FingerPaint example that Qt provides works fine. I can draw with two finger everytimes (since my monitor only supports two simultaneous touches).
Now please enlighten me what going wrong here. I suspect that this issue is related to focus of the widgets.
Any pointers to further investigation or solution are appreciated.
Thanks
Bookmarks