Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
d384e1a4
"README.md" did not exist on "389ca2525359844e47a442badb59a17bddacdbb3"
Commit
d384e1a4
authored
15 years ago
by
Kavindra Devi Palaraja
Browse files
Options
Downloads
Patches
Plain Diff
Doc - More of Part 6
Reviewed-By: TrustMe
parent
b1761033
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/addressbook-sdk.qdoc
+19
-9
19 additions, 9 deletions
doc/addressbook-sdk.qdoc
with
19 additions
and
9 deletions
doc/addressbook-sdk.qdoc
+
19
−
9
View file @
d384e1a4
...
...
@@ -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
*/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment