草庐IT

QGestureEvent

全部标签

c++ - 鼠标的QGestureEvent

我编写了与map一起工作的桌面应用程序,我想对平移和长按事件使用react。普通鼠标可以在Qt/Linux/X11上使用QGestureEvent吗?我拿了Qtgestureexample,它适用于平板电脑,但对按下鼠标左键并移动没有反应(我希望应用程序将其识别为点击或滑动事件)。然后我添加到Qtgestureexampleapp.setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents,true);在main和这样的代码到imagewidget.cpp:voidImageWidget::mousePressEvent(QMo