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
bc7edb64
Commit
bc7edb64
authored
16 years ago
by
Kavindra Devi Palaraja
Browse files
Options
Downloads
Patches
Plain Diff
Fixes: Doc - more of the tutorial - explaining why we need a main
layout for the top-level widget. RevBy: Daniel Molkentin
parent
7ee70554
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/addressbook-sdk.qdoc
+16
-6
16 additions, 6 deletions
doc/addressbook-sdk.qdoc
with
16 additions
and
6 deletions
doc/addressbook-sdk.qdoc
+
16
−
6
View file @
bc7edb64
...
...
@@ -136,6 +136,7 @@
Now that we have all the files we need, let's move on to designing the user
interface.
\section1 Placing Widgets on the Form
In the \gui{Project Sidebar}, double-click on the \c{addressbook.ui} file.
...
...
@@ -153,14 +154,21 @@
earlier. We use a QGridLayout to position our labels and input fields in a
structured manner. QGridLayout divides the available space into a grid and
places widgets in the cells we specify with row and column numbers. The
diagram below shows the layout cells and the position of our widgets.
diagram below shows the layout cells and the position of our widgets. Place
your widgets accordingly and save the form by choosing
\gui{File | Save} or using the \key{Ctrl+S} shortcut.
\image addressbook-tutorial-part1-labeled-screenshot.png
Place your widgets accordingly and save the form by choosing
\gui{File | Save} or using the \key{Ctrl+S} shortcut.
A common
A common mistake when designing user interfaces with \QD is overlooking the
top level widget's layout. Unlike sub-layouts, which \QD displays with a
red border, top level layouts have no graphical representation. Layouts are
necessary for top level widgets, in this case QWidget, to ensure that when
the window is resized, the widgets on the form will resize accordingly. You
can try this out by pressing \key{Ctrl+R} now. To correct it, simply click
anywhere on the form and select \gui{Lay out Horizontally} or
\gui{Lay out Vertically}. The output will be the same. Now your widgets
will resize correctly.
\section1 The AddressBook Class
...
...
@@ -280,7 +288,9 @@
## image
Select all the objects on the form (use \key{Ctrl+A}) and lay them out in a
grid.
grid. Lastly, set the top level widget's layout by right-clicking anywhere
on the widget and selecting \gui{Lay out Horizontally} or
\gui{Lay out Vertically}.
...
...
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