QtLogo
-
I have it into
@./QtSdk/Examples/4.7/opengl/shared/qtlogo.h@ -
@void GLWidget::mouseMoveEvent(QMouseEvent *event)
{
int dx = event->x() - lastPos.x();
int dy = event->y() - lastPos.y();if (event->buttons() & Qt::LeftButton) { setXRotation(xRot + 8 * dy); setYRotation(yRot + 8 * dx); } else if (event->buttons() & Qt::RightButton) { setXRotation(xRot + 8 * dy); setZRotation(zRot + 8 * dx); } lastPos = event->pos();
} @
I delete the event->button() in mouseMoveEvent(), and it works.
And I find that "event->buttons() & Qt::LeftButton " equals to "Qt::LeftArrow".
Is it right?Edit: please wrap code sections in @ tags; Andre