Game Programming using Qt 5 Beginner's Guide
上QQ阅读APP看书,第一时间看更新

Pop quiz

Q1. Which classes can have signals?

  1. All classes derived from QWidget.
  2. All classes derived from QObject.
  3. All classes.

Q2. For which of the following do you have to provide your own implementation?

  1. A signal.
  2. A slot.
  3. Both.

Q3. A method that returns the preferred size of a widget is called which of these?

  1. preferredSize.
  2. sizeHint.
  3. defaultSize.

Q4. What is the purpose of the QAction object?

  1. It represents a functionality that a user can invoke in the program.
  2. It holds a key sequence to move the focus on a widget.
  3. It is a base class for all forms generated using the form editor.