summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-21 15:21:21 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-21 15:21:21 (GMT)
commit27c18a5cd8dbe2d22c8717044922ad5437e6fff4 (patch)
treead3665425efea292c5383bf11ba59075db3747b4 /src/gui/widgets
parentbeef4e0f938142aedcaccbd9bfbfb4101c433853 (diff)
parentff187688e113ec157dd14abcef0faf602b68901c (diff)
downloadQt-27c18a5cd8dbe2d22c8717044922ad5437e6fff4.zip
Qt-27c18a5cd8dbe2d22c8717044922ad5437e6fff4.tar.gz
Qt-27c18a5cd8dbe2d22c8717044922ad5437e6fff4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/doc-staging into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/doc-staging: (29 commits) Doc: Added a missing license header. doc: Replaced some \raw and \endraw uses with \table and \endtable doc: Replaced some \raw and \endraw uses with \table and \endtable doc: Replaced some \raw and \endraw uses with \table and \endtable Doc: Added a note about the Public Suffix List. Doc: Fixed doc bug in Diagram Scene example doc: Removed some empty \row commands from a table. Doc: Added link to QML Basic Types in main Qt Quick page. Doc: Added missing What's New information for Qt 4.6 and 4.7. Doc: Fixed incorrect case in a page file name. Doc: Added a link to the QML Basic Types page. Doc: Removed duplicate external page reference. Doc: Fixed a link to the correct searchPaths() function. Doc: Added documentation about the use of null custom title bar widgets. Doc: Added a missing external page reference. Fixed the QML Focus document. Fixed snippets, images, and formatting. Added QML coding convention for "private" properties. Fixed link to qtestlib-tools by adding link to qt-webpages.qdoc. Some whitespace fixes. Fixed a bug by changing the id name to lower case. ...
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qdockwidget.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp
index df9b171..0a6269d 100644
--- a/src/gui/widgets/qdockwidget.cpp
+++ b/src/gui/widgets/qdockwidget.cpp
@@ -1531,8 +1531,11 @@ QAction * QDockWidget::toggleViewAction() const
/*!
\since 4.3
+
Sets an arbitrary \a widget as the dock widget's title bar. If \a widget
- is 0, the title bar widget is removed, but not deleted.
+ is 0, any custom title bar widget previously set on the dock widget is
+ removed, but not deleted, and the default title bar will be used
+ instead.
If a title bar widget is set, QDockWidget will not use native window
decorations when it is floated.
@@ -1540,23 +1543,27 @@ QAction * QDockWidget::toggleViewAction() const
Here are some tips for implementing custom title bars:
\list
- \i Mouse events that are not explicitly handled by the title bar widget
+ \o Mouse events that are not explicitly handled by the title bar widget
must be ignored by calling QMouseEvent::ignore(). These events then
propagate to the QDockWidget parent, which handles them in the usual
manner, moving when the title bar is dragged, docking and undocking
when it is double-clicked, etc.
- \i When DockWidgetVerticalTitleBar is set on QDockWidget, the title
+ \o When DockWidgetVerticalTitleBar is set on QDockWidget, the title
bar widget is repositioned accordingly. In resizeEvent(), the title
bar should check what orientation it should assume:
\snippet doc/src/snippets/code/src_gui_widgets_qdockwidget.cpp 0
- \i The title bar widget must have a valid QWidget::sizeHint() and
+ \o The title bar widget must have a valid QWidget::sizeHint() and
QWidget::minimumSizeHint(). These functions should take into account
the current orientation of the title bar.
+
+ \o It is not possible to remove a title bar from a dock widget. However,
+ a similar effect can be achieved by setting a default constructed
+ QWidget as the title bar widget.
\endlist
- Using qobject_cast as shown above, the title bar widget has full access
+ Using qobject_cast() as shown above, the title bar widget has full access
to its parent QDockWidget. Hence it can perform such operations as docking
and hiding in response to user actions.