Skip to content
Permalink
Browse files

Enable touch for the map canvas on windows

  • Loading branch information
NathanW2 committed Jun 5, 2013
1 parent 5e29777 commit e21f160a7625c3116f2a5c705fce20b38b945014
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/gui/qgsmapcanvas.cpp
@@ -129,6 +129,13 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
connect( QgsProject::instance(), SIGNAL( writeProject( QDomDocument & ) ),
this, SLOT( writeProject( QDomDocument & ) ) );
mMap->resize( size() );

#ifdef Q_OS_WIN
// Enable touch event on Windows.
// Qt on Windows needs to be told it can take touch events or else it ignores them.
grabGesture(Qt::PinchGesture);
viewport()->setAttribute(Qt::WA_AcceptTouchEvents);
#endif
} // QgsMapCanvas ctor


0 comments on commit e21f160

Please sign in to comment.
You can’t perform that action at this time.