Added wheel mouse support to the QML app.

This commit is contained in:
Xawotihs
2012-01-10 22:18:50 +00:00
parent bb2536512a
commit d50039bb1a
2 changed files with 11 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ public:
void resize ( const QRectF &rect);
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
void wheelEvent ( QGraphicsSceneWheelEvent * event);
signals:
void activeChanged();

View File

@@ -310,3 +310,13 @@ void WagicCore::keyReleaseEvent(QKeyEvent *event)
return;
}
void WagicCore::wheelEvent ( QGraphicsSceneWheelEvent * event)
{
if(event->orientation() == Qt::Vertical)
m_engine->Scroll(0, 3*event->delta());
else
m_engine->Scroll(3*event->delta(), 0);
event->accept();
}