10.8.  Review Questions

[ fromfile: mainwindows-questions.xml id: mainwindows-questions ]

  1. What are the main features of a QMainWindow?

  2. How can you install a QMenuBar in a QMainWindow?

  3. How can you save and later restore the size, position, and arrangements of widgets for a GUI app?

  4. What is a central widget?

  5. How does a widget become the central widget?

  6. What are dock widgets for?

  7. How many dock widgets can you have in one application?

  8. How can you make use of dock widgets?

  9. What is an action?

  10. How can you make use of actions?

  11. What is an action group? Why would you have one in your application?

  12. How can you make your application available to people who can't understand English?

  13. What is a QAction? How are actions triggered?

      A QAction is an object representing something that the user can do to the program. It can be triggered through menu items, button clicking, keyboard presses, etc.

  14. It is possible to create QMenus without using QActions. What are the advantages of using a QAction?

      By creating a unique QAction for each action, you can add it to different menus and toolbars, and from one place, disable/enable it, or change other properties (such as its label or tooltip) and it will reflect in all views (menuitems, toolbar buttons, etc) that refer to it.

  15. Which Qt classes use the Command pattern?

      QRunnable, QProcess, QAction, QThread, QtConcurrentRun