Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
6.9.0
Description
Disabling press & hold like so:
class ApplicationEventFilter : public QObject { public: bool eventFilter (QObject * obj, QEvent * event) { switch (event->type ()) { case QEvent::Show: case QEvent::WinIdChange: { if (obj->isWidgetType () && (((QWidget *)obj)->effectiveWinId() != 0)) { HWND hWnd = (HWND) ((QWidget *)obj)->effectiveWinId(); qDebug ("HWND: %lld", (qint64)hWnd); ATOM atomID = 0; LPCTSTR tabletAtom = TEXT("MicrosoftTabletPenServiceProperty"); atomID = GlobalAddAtom (tabletAtom); if (atomID != 0) { SetProp (hWnd, tabletAtom, reinterpret_cast <HANDLE> (1)); GlobalDeleteAtom (atomID); } } } break; default: break; } return QObject::eventFilter (obj, event); } };
causes QMenu only ever to behave as if it was hovered when the user tries to interact with the menu using a touch panel. Tapping on menu items will no longer trigger the corresponding actions with touch panel. Mouse input works fine.
This seems to have worked fine until the change: https://codereview.qt-project.org/c/qt/qtbase/+/483406 (QTBUG-62912)