Pop quiz

Q1. Which class should you use to load a JPEG image from a file and change a few pixels in it?

  1. QImage
  2. QPixmap
  3. QIcon

Q2. Which function can be used to schedule a repaint of the widget?

  1. paintEvent()
  2. update()
  3. show()

Q3. Which function can be used to change the color of the outline drawn by QPainter?

  1. setColor()
  2. setBrush()
  3. setPen()

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.