summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/doc/src')
-rw-r--r--src/gui/doc/src/dnd.qdoc37
-rw-r--r--src/gui/doc/src/richtext.qdoc4
2 files changed, 26 insertions, 15 deletions
diff --git a/src/gui/doc/src/dnd.qdoc b/src/gui/doc/src/dnd.qdoc
index a4eb77469b..ad48d7b5c7 100644
--- a/src/gui/doc/src/dnd.qdoc
+++ b/src/gui/doc/src/dnd.qdoc
@@ -41,9 +41,11 @@
\tableofcontents
This document describes the basic drag and drop mechanism and
- outlines the approach used to enable it in custom widgets. Drag
- and drop operations are also supported by Qt's item views and by
- the graphics view framework. More information is available in
+ outlines the approach used to enable it in custom controls. Drag
+ and drop operations are also supported by many of Qt's controls,
+ such as the item views and graphics view framework, as well as
+ editing controls for Qt Widgets and Qt Quick. More information
+ about item views and graphics view is available in
\l{Using drag and drop with item views} and \l{Graphics View
Framework}.
@@ -56,22 +58,31 @@
\section1 Configuration
- The QApplication object provides some properties that are related
+ The QStyleHints object provides some properties that are related
to drag and drop operations:
\list
- \li \l{QApplication::startDragTime} describes the amount of time in
+ \li \l{QStyleHints::startDragTime()} describes the amount of time in
milliseconds that the user must hold down a mouse button over an
object before a drag will begin.
- \li \l{QApplication::startDragDistance} indicates how far the user has to
+ \li \l{QStyleHints::startDragDistance()} indicates how far the user has to
move the mouse while holding down a mouse button before the movement
- will be interpreted as dragging. Use of high values for this quantity
- prevents accidental dragging when the user only meant to click on an
- object.
+ will be interpreted as dragging.
+ \li \l{QStyleHints::startDragVelocity()} indicates how fast (in pixels/second)
+ the user has to move the mouse to start a drag. A value of \c 0 means
+ that there is no such limit.
\endlist
- These quantities provide sensible default values for you to use if you
- provide drag and drop support in your widgets.
+ These quantities provide sensible default values that are compliant with
+ the underlying windowing system for you to use if you
+ provide drag and drop support in your controls.
+
+ \section1 Drag and Drop in Qt Quick
+
+ The rest of the document focuses mainly on how to implement drag and drop
+ in C++. For using drag and drop inside a Qt Quick scene, please read the
+ documentation for the Qt Quick \l{Drag}, \l{DragEvent} and \l{DropArea} items.
+ There is also an example \l{quick/draganddrop}{available}.
\section1 Dragging
@@ -335,7 +346,7 @@
the clipboard. To access this, you need to obtain a QClipboard object
from the QApplication object:
- \snippet widgets/charactermap/mainwindow.cpp 3
+ \snippet ../widgets/widgets/charactermap/mainwindow.cpp 3
The QMimeData class is used to represent data that is transferred to and
from the clipboard. To put data on the clipboard, you can use the
@@ -350,7 +361,7 @@
For example, we can copy the contents of a QLineEdit to the clipboard
with the following code:
- \snippet widgets/charactermap/mainwindow.cpp 11
+ \snippet ../widgets/widgets/charactermap/mainwindow.cpp 11
Data with different MIME types can also be put on the clipboard.
Construct a QMimeData object and set data with setData() function in
diff --git a/src/gui/doc/src/richtext.qdoc b/src/gui/doc/src/richtext.qdoc
index b4ba4ba6c4..448c42631b 100644
--- a/src/gui/doc/src/richtext.qdoc
+++ b/src/gui/doc/src/richtext.qdoc
@@ -851,7 +851,7 @@
\contentspage richtext.html Contents
\previouspage Common Rich Text Editing Tasks
- Qt's text widgets are able to display rich text, specified using a subset of \l{HTML 4}
+ Qt's text widgets are able to display rich text, specified using a subset of \l {http://www.w3.org/TR/html401/}{HTML 4}
markup. Widgets that use QTextDocument, such as QLabel and QTextEdit, are able to display
rich text specified in this way.
@@ -863,7 +863,7 @@
setting a label's \l{QLabel::}{text} property with the string \c{"<b>Hello</b> <i>Qt!</i>"}
will result in the label displaying text like this: \b{Hello} \e{Qt!}
- When HTML markup is used for text, Qt follows the rules defined by the \l{HTML 4}
+ When HTML markup is used for text, Qt follows the rules defined by the \l{http://www.w3.org/TR/html401/}{HTML 4}
specification. This includes default properties for text layout, such as the
direction of the text flow (left-to-right) which can be changed by applying the
\l{#Block Attributes}{\c dir} attribute to blocks of text.