54 origin =
event->pos();
57 rubberBand->setGeometry(
QRect(origin,
QSize()));
The QMouseEvent class contains parameters that describe a mouse event.
The QRect class defines a rectangle in the plane using integer precision.
QRect normalized() const noexcept
The QRubberBand class provides a rectangle or line that can indicate a selection or a boundary.
The QSize class defines the size of a two-dimensional object using integer point precision.