I have a class which displays a map and therefore has to inherit from QQuickItem
. I wish to integrate the pinch zoom function into the map display class however it was not possible to setAttribute(Qt::WA_AcceptTouchEvents)
.
MapWidget::MapWidget(QQuickItem* parent) : QQuickPaintedItem(parent)
{
setAttribute(Qt::WA_AcceptTouchEvents);
}
I then added QWidget as a class to be inherited from but of course there was a conflict with QObject.
Does anybody know how else I can integrate a pinch zoom function into my class? QQuickItem
is however not possible to be removed or the restructuring for the map display will be immense.