summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-12-14 13:01:13 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-12-14 13:01:13 (GMT)
commit086a010a63895c6e6d178c1de9434483f11b2d34 (patch)
treebb2542f04438b42ae5c61b1c3a6330f011700474 /src/gui/widgets
parent0fe36ac832abf8f8d438b21fce0177b65b3bbf3a (diff)
parent5cb2226ddf96555417f08c9bfe35addfc93f6acd (diff)
downloadQt-086a010a63895c6e6d178c1de9434483f11b2d34.zip
Qt-086a010a63895c6e6d178c1de9434483f11b2d34.tar.gz
Qt-086a010a63895c6e6d178c1de9434483f11b2d34.tar.bz2
Merge branch 'qdoc-simplified' into mimir-simplified
Conflicts: tools/qdoc3/atom.h tools/qdoc3/qdoc3.pro
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.