Pop quiz
Q1. Which of the following is a requirement for animating a property?
- The name of the property must start with "
m_
". - Getter and setter of the property must be slots.
- The property must be declared using the
Q_PROPERTY
macro.
Q2. Which class sends a signal when a gamepad button is pressed or released?
QGamepad
QWidget
QGraphicsScene
Q3. What is the difference between the shape()
and boundingRect()
functions of QGraphicsItem
?
shape()
returns the bounding rectangle as aQPainterPath
instead of aQRectF
shape()
causes the item to be repainted.share()
can return a more precise description of the item's boundaries thanboundingRect()