54 if (QMenu *popupMenu =
inputManager()->toolProxy()->popupActionsMenu()) {
55 QEvent::Type requestingEventType =
event ?
event->type() : QEvent::None;
59 if (requestingEventType == QEvent::TouchBegin) {
60 const QTouchEvent *touchEvent =
static_cast<const QTouchEvent *
>(event);
61#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
66 if (touchPoints.isEmpty()) {
70 requestingEventType = QEvent::None;
72#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
73 touchPos = touchPoints.constFirst().globalPosition();
75 touchPos = touchPoints.constFirst().screenPos();
84 QTimer::singleShot(0,
this, [popupMenu, requestingEventType, touchPos](){
87 QScopedPointer<SinglePressEventEater> eventEater;
89 if (requestingEventType == QEvent::TabletPress) {
91 popupMenu->installEventFilter(eventEater.data());
92 popupPos = QCursor::pos() + QPoint(10,10);
93 }
else if (requestingEventType == QEvent::TouchBegin) {
94 popupPos = touchPos.toPoint();
96 popupPos = QCursor::pos();
99 popupMenu->exec(popupPos);
104 if (!popupWidget->onScreen()) {
110 popupWidget->popup(pos);
112 popupWidget->dismiss();