Skip to content

Commit

Permalink
Enable touch for the map canvas on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Jun 5, 2013
1 parent 5e29777 commit e21f160
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -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


Expand Down

0 comments on commit e21f160

Please sign in to comment.