summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-06-30 22:59:21 +0200
committerLiang Qi <liang.qi@qt.io>2018-07-02 11:23:45 +0200
commite3ed2281c0c891cf3b15c95f9f7cdae42e9f233a (patch)
treeaae8da6ce616eae02b69fb1fcdcb4383c8fe6811 /examples/widgets/doc
parent3be141d5bc199080b524d8f6f5ce514e8f74d23a (diff)
parente75e4b39b78ba05ea2cd45dc96acf99fc89c5915 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: MÃ¥rten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
Diffstat (limited to 'examples/widgets/doc')
-rw-r--r--examples/widgets/doc/src/basicgraphicslayouts.qdoc2
-rw-r--r--examples/widgets/doc/src/blurpicker.qdoc2
-rw-r--r--examples/widgets/doc/src/boxes.qdoc2
-rw-r--r--examples/widgets/doc/src/chip.qdoc2
-rw-r--r--examples/widgets/doc/src/collidingmice-example.qdoc2
-rw-r--r--examples/widgets/doc/src/diagramscene.qdoc2
-rw-r--r--examples/widgets/doc/src/dragdroprobot.qdoc2
-rw-r--r--examples/widgets/doc/src/draggabletext.qdoc2
-rw-r--r--examples/widgets/doc/src/elasticnodes.qdoc2
-rw-r--r--examples/widgets/doc/src/embeddeddialogs.qdoc2
-rw-r--r--examples/widgets/doc/src/extension.qdoc100
-rw-r--r--examples/widgets/doc/src/fademessage.qdoc2
-rw-r--r--examples/widgets/doc/src/findfiles.qdoc2
-rw-r--r--examples/widgets/doc/src/graphicsview-anchorlayout.qdoc2
-rw-r--r--examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc2
-rw-r--r--examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc2
-rw-r--r--examples/widgets/doc/src/padnavigator.qdoc2
-rw-r--r--examples/widgets/doc/src/scribble.qdoc2
18 files changed, 70 insertions, 64 deletions
diff --git a/examples/widgets/doc/src/basicgraphicslayouts.qdoc b/examples/widgets/doc/src/basicgraphicslayouts.qdoc
index 233b8c7c0a..23661d0558 100644
--- a/examples/widgets/doc/src/basicgraphicslayouts.qdoc
+++ b/examples/widgets/doc/src/basicgraphicslayouts.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/basicgraphicslayouts
\title Basic Graphics Layouts Example
\ingroup examples-graphicsview-layout
- \brief Demonstrates how to create basic graphics layout
+ \brief Demonstrates how to create basic graphics layout.
The Basic Graphics Layouts example shows how to use the layout classes
in QGraphicsView: QGraphicsLinearLayout and QGraphicsGridLayout.
diff --git a/examples/widgets/doc/src/blurpicker.qdoc b/examples/widgets/doc/src/blurpicker.qdoc
index 87f36389e7..d4d84f7248 100644
--- a/examples/widgets/doc/src/blurpicker.qdoc
+++ b/examples/widgets/doc/src/blurpicker.qdoc
@@ -29,7 +29,7 @@
\example effects/blurpicker
\title Blur Picker Effect Example
\ingroup examples-graphicsview-graphicseffects
- \brief Demonstrates how to apply graphical effects on items in the view
+ \brief Demonstrates how to apply graphical effects on items in the view.
\image blurpickereffect-example.png
diff --git a/examples/widgets/doc/src/boxes.qdoc b/examples/widgets/doc/src/boxes.qdoc
index 7c9031a003..276c6fa78d 100644
--- a/examples/widgets/doc/src/boxes.qdoc
+++ b/examples/widgets/doc/src/boxes.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/boxes
\title Boxes
\ingroup examples-graphicsview
- \brief Combines advanced OpenGL rendering with the Graphics View framework
+ \brief Combines advanced OpenGL rendering with the Graphics View framework.
\image boxes-demo.png
diff --git a/examples/widgets/doc/src/chip.qdoc b/examples/widgets/doc/src/chip.qdoc
index 4cef4984e3..758b692f0e 100644
--- a/examples/widgets/doc/src/chip.qdoc
+++ b/examples/widgets/doc/src/chip.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/chip
\title 40000 Chips
\ingroup examples-graphicsview
- \brief Visualizes a huge graphic view scene with 40000 chip items
+ \brief Visualizes a huge graphic view scene with 40000 chip items.
This examples demonstrates Graphics View's powerful navigation
and interaction features, allowing you to zoom and rotate each of four
diff --git a/examples/widgets/doc/src/collidingmice-example.qdoc b/examples/widgets/doc/src/collidingmice-example.qdoc
index 535057bb6a..657c416218 100644
--- a/examples/widgets/doc/src/collidingmice-example.qdoc
+++ b/examples/widgets/doc/src/collidingmice-example.qdoc
@@ -28,7 +28,7 @@
/*!
\example graphicsview/collidingmice
\title Colliding Mice Example
- \brief Demonstrates how to animate items on a graphics view
+ \brief Demonstrates how to animate items on a graphics view.
\ingroup examples-graphicsview
The Colliding Mice example shows how to use the Graphics View
diff --git a/examples/widgets/doc/src/diagramscene.qdoc b/examples/widgets/doc/src/diagramscene.qdoc
index 1c9f4faf88..ca4876f2e8 100644
--- a/examples/widgets/doc/src/diagramscene.qdoc
+++ b/examples/widgets/doc/src/diagramscene.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/diagramscene
\title Diagram Scene Example
\ingroup examples-graphicsview
- \brief Demonstrate how to use the Graphics View framework
+ \brief Demonstrate how to use the Graphics View framework.
\image diagramscene.png
diff --git a/examples/widgets/doc/src/dragdroprobot.qdoc b/examples/widgets/doc/src/dragdroprobot.qdoc
index f74b898e1b..ac138072c9 100644
--- a/examples/widgets/doc/src/dragdroprobot.qdoc
+++ b/examples/widgets/doc/src/dragdroprobot.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/dragdroprobot
\title Drag and Drop Robot Example
\ingroup examples-graphicsview
- \brief Demonstrates how to drag and drop items in a graphics view
+ \brief Demonstrates how to drag and drop items in a graphics view.
The Drag and Drop Robot example shows how to implement Drag and Drop in a
QGraphicsItem subclass, as well as how to animate items using Qt's
diff --git a/examples/widgets/doc/src/draggabletext.qdoc b/examples/widgets/doc/src/draggabletext.qdoc
index 97b2f036bd..e934119e7a 100644
--- a/examples/widgets/doc/src/draggabletext.qdoc
+++ b/examples/widgets/doc/src/draggabletext.qdoc
@@ -28,7 +28,7 @@
/*!
\example draganddrop/draggabletext
\title Draggable Text Example
- \brief Illustrates how to drag and drop text between widgets
+ \brief Illustrates how to drag and drop text between widgets.
\brief The Draggable Text example shows how to drag and drop textual data between widgets
in the same application, and between different applications.
diff --git a/examples/widgets/doc/src/elasticnodes.qdoc b/examples/widgets/doc/src/elasticnodes.qdoc
index 65e1195121..e78db67be2 100644
--- a/examples/widgets/doc/src/elasticnodes.qdoc
+++ b/examples/widgets/doc/src/elasticnodes.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/elasticnodes
\title Elastic Nodes Example
\ingroup examples-graphicsview
- \brief Demonstrates how to interact with graphical items in a scene
+ \brief Demonstrates how to interact with graphical items in a scene.
The Elastic Nodes example shows how to implement edges between nodes in a
graph, with basic interaction. You can click to drag a node around, and
diff --git a/examples/widgets/doc/src/embeddeddialogs.qdoc b/examples/widgets/doc/src/embeddeddialogs.qdoc
index 0775c58807..0b31e01e0c 100644
--- a/examples/widgets/doc/src/embeddeddialogs.qdoc
+++ b/examples/widgets/doc/src/embeddeddialogs.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/embeddeddialogs
\title Embedded Dialogs
\ingroup examples-graphicsview-layout
- \brief Demonstrates how to embed dialogs into a graphics view
+ \brief Demonstrates how to embed dialogs into a graphics view.
This example shows how to embed standard dialogs into
Graphics View. It also shows how you can customize the
diff --git a/examples/widgets/doc/src/extension.qdoc b/examples/widgets/doc/src/extension.qdoc
index d040fbb9ce..c895258acf 100644
--- a/examples/widgets/doc/src/extension.qdoc
+++ b/examples/widgets/doc/src/extension.qdoc
@@ -36,23 +36,21 @@
\image extension-example.png Screenshot of the Extension example
- The Extension application is a dialog that allows the user to
- perform a simple search as well as a more advanced search.
+ The Extension application lets the user add search parameters in
+ a dialog and launch a simple or advanced search.
The simple search has two options: \uicontrol {Match case} and \uicontrol
- {Search from start}. The advanced search options include the
- possibilities to search for \uicontrol {Whole words}, \uicontrol {Search
- backward} and \uicontrol {Search selection}. Only the simple search is
- visible when the application starts. The advanced search options
- are located in the application's extension part, and can be made
- visible by pressing the \uicontrol More button:
+ {Search from start}. The advanced search offers search for \uicontrol {Whole words},
+ \uicontrol {Search backward}, and \uicontrol {Search selection}. The
+ application starts with simple search as the default. Click the \uicontrol More button
+ to show the advanced search options:
\image extension_more.png Screenshot of the Extension example
\section1 FindDialog Class Definition
- The \c FindDialog class inherits QDialog. The QDialog class is the
- base class of dialog windows. A dialog window is a top-level
+ The \c FindDialog class inherits QDialog. QDialog is the
+ base class for dialog windows. A dialog window is a top-level
window mostly used for short-term tasks and brief communications
with the user.
@@ -62,45 +60,53 @@
displays the application's search options and controlling
buttons.
- In addition to a constructor, we declare the several child
- widgets: We need a QLineEdit with an associated QLabel to let the
- user type a word to search for, we need several \l
- {QCheckBox}{QCheckBox}es to facilitate the search options, and we
- need three \l {QPushButton}{QPushButton}s: the \uicontrol Find button to
- start a search and the \uicontrol More button to enable an advanced search.
- Finally, we need a QWidget representing the application's extension
- part.
+ In addition to the constructor, there are several child widgets:
+
+ \list
+ \li A QLineEdit with an associated QLabel to let the
+ user type a word to search for.
+ \li Several \l {QCheckBox}{QCheckBox}es to facilitate the search options.
+ \li Three \l {QPushButton}{QPushButton}s:
+ \list
+ \li the \uicontrol Find button to start a search
+ \li the \uicontrol More button to enable an advanced search
+ \li a QWidget representing the application's extension part
+ \endlist
+ \endlist
\section1 FindDialog Class Implementation
- In the constructor we first create the standard child widgets for
- the simple search: the QLineEdit with the associated QLabel, two
- of the \l {QCheckBox}{QCheckBox}es and all the \l
- {QPushButton}{QPushButton}s.
+ Create the standard child widgets for the simple search in the constructor:
+ the QLineEdit with the associated QLabel, two {QCheckBox}es and all the
+ \l {QPushButton}{QPushButton}s.
\snippet dialogs/extension/finddialog.cpp 0
- We give the options and buttons a shortcut key using the &
- character. In the \uicontrol {Find what} option's case, we also need to
- use the QLabel::setBuddy() function to make the shortcut key work
- as expected; then, when the user presses the shortcut key
- indicated by the label, the keyboard focus is transferred to the
- label's buddy widget, the QLineEdit.
-
- We set the \uicontrol Find button's default property to true, using the
+ This snippet illustrates how you can define a shortcut key
+ for a widget. A shortcut should be defined by putting the ampersand
+ character (\c &) in front of the letter that should
+ become the shortcut.
+ For example, for \uicontrol {Find what}, pressing \uicontrol Alt
+ and \uicontrol w transfers focus to the QLineEdit widget.
+ Shortcuts can also be used for checking on or off a checkmark.
+ For example, pressing \uicontrol Alt and \uicontrol c puts the check mark
+ on \uicontrol {Match Case} if it was unchecked and vice versa.
+ It is the QLabel::setBuddy() method that links a widget to the shortcut
+ character if it has been defined.
+
+ Set the \uicontrol Find button's default property to true, using the
QPushButton::setDefault() function. Then the push button will be
pressed if the user presses the Enter (or Return) key. Note that a
QDialog can only have one default button.
\snippet dialogs/extension/finddialog.cpp 2
- Then we create the extension widget, and the \l
- {QCheckBox}{QCheckBox}es associated with the advanced search
- options.
+ Create the extension widget, and the \l {QCheckBox}{QCheckBox}es associated
+ with the advanced search options.
\snippet dialogs/extension/finddialog.cpp 3
- Now that the extension widget is created, we can connect the \uicontrol
+ Now that the extension widget is created, connect the \uicontrol
More button's \l{QAbstractButton::toggled()}{toggled()} signal to
the extension widget's \l{QWidget::setVisible()}{setVisible()} slot.
@@ -111,26 +117,26 @@
the status is true the widget is shown, otherwise the widget is
hidden.
- Since we made the \uicontrol More button checkable when we created it,
- the connection makes sure that the extension widget is shown
- depending on the state of \uicontrol More button.
+ Since the \uicontrol More button is checkable, the connection makes
+ sure that the extension widget is shown depending on the state of
+ the \uicontrol More button.
- We also put the check boxes associated with the advanced
- search options into a layout we install on the extension widget.
+ Create checkboxes associated with the advanced search options in
+ a layout installed on the extension widget.
\snippet dialogs/extension/finddialog.cpp 4
- Before we create the main layout, we create several child layouts
- for the widgets: First we align the QLabel and its buddy, the
- QLineEdit, using a QHBoxLayout. Then we vertically align the
- QLabel and QLineEdit with the check boxes associated with the
- simple search, using a QVBoxLayout. We also create a QVBoxLayout
- for the buttons. In the end we lay out the two latter layouts and
- the extension widget using a QGridLayout.
+ Before creating the main layout, create several child layouts
+ for the widgets. First align the QLabel and its buddy, the
+ QLineEdit, using a QHBoxLayout. Then align the QLabel and the QLineEdit
+ vertically with the checkboxes associated with the simple search,
+ using a QVBoxLayout. Create also a QVBoxLayout for the buttons.
+ Finally, lay out the two latter layouts and the extension widget
+ using a QGridLayout.
\snippet dialogs/extension/finddialog.cpp 5
- Finally, we hide the extension widget using the QWidget::hide()
+ Hide the extension widget using the QWidget::hide()
function, making the application only show the simple search
options when it starts. When the user wants to access the advanced
search options, the dialog only needs to change the visibility of
diff --git a/examples/widgets/doc/src/fademessage.qdoc b/examples/widgets/doc/src/fademessage.qdoc
index 4703dcda30..2035922067 100644
--- a/examples/widgets/doc/src/fademessage.qdoc
+++ b/examples/widgets/doc/src/fademessage.qdoc
@@ -29,7 +29,7 @@
\example effects/fademessage
\title Fade Message Effect Example
\ingroup examples-graphicsview-graphicseffects
- \brief Demonstrates how to apply effects on items in the view
+ \brief Demonstrates how to apply effects on items in the view.
\div { style="text-align: left"}
\inlineimage fademessageeffect-example.png
diff --git a/examples/widgets/doc/src/findfiles.qdoc b/examples/widgets/doc/src/findfiles.qdoc
index ad39b003ae..d7428e7d16 100644
--- a/examples/widgets/doc/src/findfiles.qdoc
+++ b/examples/widgets/doc/src/findfiles.qdoc
@@ -30,7 +30,7 @@
\title Find Files Example
\ingroup examples-dialogs
- \brief A dialog for finding files in a specified folder
+ \brief A dialog for finding files in a specified folder.
The Find Files application allows the user to search for files in a
specified directory, matching a given file name or wildcard,
diff --git a/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc
index bd27a0dc4f..7933e3c956 100644
--- a/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc
+++ b/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/anchorlayout
\title Anchor Layout Example
\ingroup examples-graphicsview-layout
- \brief Demonstrates anchor layout in a graphics view scene
+ \brief Demonstrates anchor layout in a graphics view scene.
The Anchor Layout example demonstrates the use of the QGraphicsAnchorLayout
class.
diff --git a/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc
index fd0427fdc0..27b3f86156 100644
--- a/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc
+++ b/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/simpleanchorlayout
\title Simple Anchor Layout Example
\ingroup examples-graphicsview-layout
- \brief Demonstrates anchor layout on a graphics view scene
+ \brief Demonstrates anchor layout on a graphics view scene.
The Simple Anchor Layout example shows the basic use of the
QGraphicsAnchorLayout class.
diff --git a/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc
index fbdd08654d..71ace60355 100644
--- a/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc
+++ b/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/weatheranchorlayout
\title Weather Anchor Layout Example
\ingroup examples-graphicsview-layout
- \brief Demonstrates anchor layout on a graphics view scene
+ \brief Demonstrates anchor layout on a graphics view scene.
The Weather Anchor Layout example shows more complex use of the
QGraphicsAnchorLayout class to create a real-world window layout.
diff --git a/examples/widgets/doc/src/padnavigator.qdoc b/examples/widgets/doc/src/padnavigator.qdoc
index 017532622a..e59fa3cdbe 100644
--- a/examples/widgets/doc/src/padnavigator.qdoc
+++ b/examples/widgets/doc/src/padnavigator.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/padnavigator
\title Pad Navigator Example
\ingroup examples-graphicsview
- \brief Demonstrates how to create animated user interface
+ \brief Demonstrates how to create animated user interface.
The Pad Navigator Example shows how you can use Graphics View together with
embedded widgets and Qt's \l{The State Machine Framework}{state machine
diff --git a/examples/widgets/doc/src/scribble.qdoc b/examples/widgets/doc/src/scribble.qdoc
index 3b1f8dc895..ca79431334 100644
--- a/examples/widgets/doc/src/scribble.qdoc
+++ b/examples/widgets/doc/src/scribble.qdoc
@@ -149,7 +149,7 @@
For mouse press and mouse release events, we use the
QMouseEvent::button() function to find out which button caused
- the event. For mose move events, we use QMouseEvent::buttons()
+ the event. For mouse move events, we use QMouseEvent::buttons()
to find which buttons are currently held down (as an OR-combination).
If the users press the left mouse button, we store the position