// Классы квадратиковclass TopLeftSquare : public QGraphicsRectItem{.... // поведение}class TopRightSquare : public QGraphicsRectItem{....}class BottomLeftSquare : public QGraphicsRectItem{....}class BottomRightSquare : public QGraphicsRectItem{....}struct AllSquares{ AllSquares (MyGraphicsItem *parent);private: TopLeftSquare *m_topLeft; TopRightSquare *m_topRight; BottomLeftSquare *m_bottomLeft; BottomRightSquare *m_bottomRight;}class MyGraphicsItem : public QGraphicsItem{private: AllSquares sizeChangers;}
void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ) { setCursor( QCursor(Qt::PointingHandCursor) );}