The next step to creating our basic address book application is to allow a
little bit of user interaction.
- ### \image addressbook-tutorial-part2-add-contact.png
+ \image addressbook-tutorial-part2-add-contact.png
We will provide a push button that the user can click to add a new contact.
Also, some form of data structure is needed to store these contacts in an
of the widget. The figure below shows the difference between using the
spacer and not using it.
- ## image
+ \image addressbook-tutorial-part2-stretch-effects.png
Select all the objects on the form (use \key{Ctrl+A}) and lay them out in a
grid. Lastly, set the top level widget's layout by right-clicking anywhere
We connect the push buttons' \l{QAbstractButton::}{clicked()} signal to
their respective slots. The figure below illustrates this.
- #image
+ \image addressbook-tutorial-part2-signals-and-slots.png
Finally, we set the window title to "Simple Address Book" using the
\l{QWidget::}{setWindowTitle()} function.