diff options
author | Kavindra Devi Palaraja <kavindra.palaraja@nokia.com> | 2009-07-13 13:24:54 +0200 |
---|---|---|
committer | Kavindra Devi Palaraja <kavindra.palaraja@nokia.com> | 2009-07-13 13:25:06 +0200 |
commit | d384e1a48f576c82c6b73fe4928b303d4f67abba (patch) | |
tree | e214fe67163aaff59b14c6a68a5c6c00472c5510 /doc | |
parent | b1761033eacd31ee5f0af53442911994d64f7c32 (diff) | |
download | qt-creator-d384e1a48f576c82c6b73fe4928b303d4f67abba.tar.gz |
Doc - More of Part 6
Reviewed-By: TrustMe
Diffstat (limited to 'doc')
-rw-r--r-- | doc/addressbook-sdk.qdoc | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc index 586b9b3a1d..259512694f 100644 --- a/doc/addressbook-sdk.qdoc +++ b/doc/addressbook-sdk.qdoc @@ -895,9 +895,26 @@ and writing to it is as simple as opening the stream - with the respective device as a parameter - and reading from or writing to it. + \section1 Placing Widgets on The Form + To load and save files containing contact details, we need two push + buttons. Drag them and name them accordingly. Their \c objectName + properties should be \c loadButton and \c saveButton, respectively. Then, + similar to \l{Address Book 5 - Adding a Find Function}{Chapter 5}, we place + these buttons in our layout simply by dragging and dropping them. + + The \c text property of our push buttons are \gui{Load...} and + \gui{Save...} respectively. Ideally, it would be more user-friendly to set + the push buttons' labels to \gui{Load contacts from file} and + \gui{Save contacts to file}. However, due to the size of our push buttons, + we set the labels to \gui{Load...} and \gui{Save...} instead. Fortunately, + Qt Creator's \QD plugin provides a simple way to set tooltips with the + \c toolTip property. To test your tooltip, use \key{Ctrl+Alt+R} and hover + your mouse cursor on the push buttons. + + # screenshot of property editor \section1 The AddressBook Class @@ -908,16 +925,7 @@ # code In our constructor, we instantiate \c loadButton and \c saveButton. - Ideally, it would be more user-friendly to set the push buttons' labels to - "Load contacts from a file" and "Save contacts to a file". However, due to - the size of our push buttons, we set the labels to \gui{Load...} and - \gui{Save...}. Fortunately, Qt Creator's \QD plugin provides a simple way - to set tooltips with the \gui{Property Editor}. Simply fill in your tool - tips in the \gui{toolTip} property. To test your tooltip, use - \key{Ctrl+Alt+R} and hover your mouse cursor on the \gui{Load...} and - \gui{Save...} push buttons. - # screenshot of property editor Now lets look at the \c saveToFile() and \c loadFromFile() functions in detail. @@ -1010,6 +1018,8 @@ \section1 Placing Widgets on The Form + We add + \section1 The AddressBook Class */ |