Update:
I think I have found the cause of this issue but not sure if that's by design or a bug in QWidget.
As explained in above posts first time two widgets receive multi-touch events but after that only one widget receives touch events.
Usually Qt doesn't create separate native widgets for each widget that is placed upon main window (unless Qt::WA_NativeWindow attribute is set). It only creates one native widget and maintains child widgets. You can confirm this using Spy++ (which comes along with Visual Studio) or similar tool. I found that after the first touch/mouse event, Qt creates a native widget for the knob even if QCoreApplication::setAttribute(Qt::AA_DontCreateNa tiveWidgetSiblings) is done. So now if you touch that knobs it will grab the touch event and won't allow other knobs to receive simultaneous event.
I also made changes in QWidget::winID() and added following code
if(QCoreApplication::testAttribute(Qt
::AA_DontCreateNativeWidgetSiblings)==false) that->setAttribute(Qt::WA_NativeWindow);
if(QCoreApplication::testAttribute(Qt::AA_DontCreateNativeWidgetSiblings)==false)
that->setAttribute(Qt::WA_NativeWindow);
To copy to clipboard, switch view to plain text mode
instead of
that->setAttribute(Qt::WA_NativeWindow);
that->setAttribute(Qt::WA_NativeWindow);
To copy to clipboard, switch view to plain text mode
My changes fixes issue, and now I can move multiple knobs simultaneously more than once. Let me know if someone thinks that this might break something. Also let me know where can I post this issue so that Qt team can fix it or justify current behavior.
Added after 1 2 minutes:
FYI:
This is a bug and is already reported to Qt team. You can track it at Qt-BugReport
Bookmarks