1 #include <QGraphicsScene>
3 #include "ViewPreview.h"
7 QGraphicsView (scene, parent)
9 setMouseTracking(
true);
14 QPointF pos = mapToScene (event->pos ());
22 fitInView (scene()->itemsBoundingRect ());
24 QGraphicsView::resizeEvent (event);
void signalMouseMove(QPointF pos)
Forward the mouse move events.
virtual void mouseMoveEvent(QMouseEvent *event)
Intercept cursor move events and forward them.
ViewPreview(QGraphicsScene *scene, QWidget *parent=0)
Single constructor.
virtual void resizeEvent(QResizeEvent *event)
Intercept resize events so we can rescale to the graphics items just fit into the resized window...