zhuang@linux:~/reading/cpp-gui-programming-with-qt-4/overview/$ less

C++ GUI Programming with Qt 4 (2nd Edition) / chapter 01

Notes for C++ GUI Programming with Qt 4 (2nd Edition)

$ grep tags overview.md

This post extracts some knowledge from C++ GUI Programming with Qt 4 (2nd Edition).

Chapter 2. Creating Dialogs

Whether we do it in code or in Qt Designer, creating a dialog always involves the same fundamental steps:

  1. Create and initialize the child widgets.
  2. Put the child widgets in layouts.
  3. Set the tab order.
  4. Establish signalslot connections.
  5. Implement the dialog’s custom slots.

Qt’s parent-child mechanism is implemented in QObject. When we create an object (a widget, validator, or any other kind) with a parent, the parent adds the object to the list of its children. When the parent is deleted, it walks through its list of children and deletes each child. The children themselves then delete all of their children, and so on recursively until none remain.

zhuang@linux:~/reading/cpp-gui-programming-with-qt-4/overview/$ comments