Pop quiz

Q1. Which of the following classes is a widget class?

  1. QGraphicsView
  2. QGraphicsScene
  3. QGraphicsItem

Q2. Which of the following actions does not change the graphics item's position on the screen?

  1. Scaling the view.
  2. Shearing this item's parent item.
  3. Translating this item.
  4. Rotating this item's child item.

Q3. Which function is not mandatory to implement in a new class derived from QGraphicsItem?

  1. boundingRect()
  2. shape()
  3. paint()

Q4. Which item class should be used to display a raster image in the Graphics View?

  1. QGraphicsRectItem
  2. QGraphicsWidget
  3. QGraphicsPixmapItem

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.