- Game Programming using Qt 5 Beginner's Guide
- Pavel Strakhov Witold Wysota Lorenz Haas
- 105字
- 2021-08-27 18:31:14
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 a QPainterPath instead of a QRectF
- shape() causes the item to be repainted.
- share() can return a more precise description of the item's boundaries than boundingRect()