Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 3272

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdockwidget.cpp -->
  <title>QDockWidget Class | Qt Widgets 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QDockWidget</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#appearance">Appearance</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QDockWidget Class</h1>
<!-- $$$QDockWidget-brief -->
<p>The <a href="qdockwidget.html">QDockWidget</a> class provides a widget that can be docked inside a <a href="qmainwindow.html">QMainWindow</a> or floated as a top-level window on the desktop. <a href="#details">More...</a></p>
<!-- @@@QDockWidget -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QDockWidget&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += widgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qwidget.html">QWidget</a></td></tr></table></div><ul>
<li><a href="qdockwidget-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeature</a></b> { DockWidgetClosable, DockWidgetMovable, DockWidgetFloatable, DockWidgetVerticalTitleBar, AllDockWidgetFeatures, NoDockWidgetFeatures }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeatures</a></b></td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qdockwidget.html#allowedAreas-prop">allowedAreas</a></b> : Qt::DockWidgetAreas</li>
<li class="fn"><b><a href="qdockwidget.html#features-prop">features</a></b> : DockWidgetFeatures</li>
<li class="fn"><b><a href="qdockwidget.html#floating-prop">floating</a></b> : bool</li>
<li class="fn"><b><a href="qdockwidget.html#windowTitle-prop">windowTitle</a></b> : QString</li>
</ul>
<ul>
<li class="fn">59 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#QDockWidget">QDockWidget</a></b>(const QString &amp;<i>title</i>, QWidget *<i>parent</i> = Q_NULLPTR, Qt::WindowFlags <i>flags</i> = Qt::WindowFlags())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#QDockWidget-1">QDockWidget</a></b>(QWidget *<i>parent</i> = Q_NULLPTR, Qt::WindowFlags <i>flags</i> = Qt::WindowFlags())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#dtor.QDockWidget">~QDockWidget</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::DockWidgetAreas </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#allowedAreas-prop">allowedAreas</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> DockWidgetFeatures </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#features-prop">features</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#isAreaAllowed">isAreaAllowed</a></b>(Qt::DockWidgetArea <i>area</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#floating-prop">isFloating</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#allowedAreas-prop">setAllowedAreas</a></b>(Qt::DockWidgetAreas <i>areas</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#features-prop">setFeatures</a></b>(DockWidgetFeatures <i>features</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#floating-prop">setFloating</a></b>(bool <i>floating</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#setTitleBarWidget">setTitleBarWidget</a></b>(QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#setWidget">setWidget</a></b>(QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#titleBarWidget">titleBarWidget</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction *</td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#toggleViewAction">toggleViewAction</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#widget">widget</a></b>() const</td></tr>
</table></div>
<ul>
<li class="fn">214 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">32 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
<li class="fn">14 public functions inherited from <a href="../qtgui/qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#allowedAreasChanged">allowedAreasChanged</a></b>(Qt::DockWidgetAreas <i>allowedAreas</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#dockLocationChanged">dockLocationChanged</a></b>(Qt::DockWidgetArea <i>area</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#featuresChanged">featuresChanged</a></b>(QDockWidget::DockWidgetFeatures <i>features</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#topLevelChanged">topLevelChanged</a></b>(bool <i>topLevel</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#visibilityChanged">visibilityChanged</a></b>(bool <i>visible</i>)</td></tr>
</table></div>
<ul>
<li class="fn">3 signals inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#initStyleOption">initStyleOption</a></b>(QStyleOptionDockWidget *<i>option</i>) const</td></tr>
</table></div>
<a name="reimplemented-protected-functions"></a>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#changeEvent">changeEvent</a></b>(QEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#closeEvent">closeEvent</a></b>(QCloseEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#event">event</a></b>(QEvent *<i>event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdockwidget.html#paintEvent">paintEvent</a></b>(QPaintEvent *<i>event</i>)</td></tr>
</table></div>
<ul>
<li class="fn">35 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="../qtgui/qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">5 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
<li class="fn">1 protected type inherited from <a href="../qtgui/qpaintdevice.html#protected-variables">QPaintDevice</a></li>
</ul>
<a name="details"></a>
<!-- $$$QDockWidget-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qdockwidget.html">QDockWidget</a> class provides a widget that can be docked inside a <a href="qmainwindow.html">QMainWindow</a> or floated as a top-level window on the desktop.</p>
<p><a href="qdockwidget.html">QDockWidget</a> provides the concept of dock widgets, also know as tool palettes or utility windows. Dock windows are secondary windows placed in the <i>dock widget area</i> around the <a href="qmainwindow.html#centralWidget">central widget</a> in a <a href="qmainwindow.html">QMainWindow</a>.</p>
<p class="centerAlign"><img src="images/mainwindow-docks.png" alt="" /></p><p>Dock windows can be moved inside their current area, moved into new areas and floated (e.g&#x2e;, undocked) by the end-user. The <a href="qdockwidget.html">QDockWidget</a> API allows the programmer to restrict the dock widgets ability to move, float and close, as well as the areas in which they can be placed.</p>
<a name="appearance"></a>
<h3 >Appearance</h3>
<p>A <a href="qdockwidget.html">QDockWidget</a> consists of a title bar and the content area. The title bar displays the dock widgets <a href="qwidget.html#windowTitle-prop">window title</a>, a <i>float</i> button and a <i>close</i> button. Depending on the state of the <a href="qdockwidget.html">QDockWidget</a>, the <i>float</i> and <i>close</i> buttons may be either disabled or not shown at all.</p>
<p>The visual appearance of the title bar and buttons is dependent on the <a href="qstyle.html">style</a> in use.</p>
<p>A <a href="qdockwidget.html">QDockWidget</a> acts as a wrapper for its child widget, set with <a href="qdockwidget.html#setWidget">setWidget</a>(). Custom size hints, minimum and maximum sizes and size policies should be implemented in the child widget. <a href="qdockwidget.html">QDockWidget</a> will respect them, adjusting its own constraints to include the frame and title. Size constraints should not be set on the <a href="qdockwidget.html">QDockWidget</a> itself, because they change depending on whether it is docked; a docked <a href="qdockwidget.html">QDockWidget</a> has no frame and a smaller title bar.</p>
</div>
<p><b>See also </b><a href="qmainwindow.html">QMainWindow</a> and <a href="qtwidgets-mainwindows-dockwidgets-example.html">Dock Widgets Example</a>.</p>
<!-- @@@QDockWidget -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$DockWidgetFeature$$$DockWidgetClosable$$$DockWidgetMovable$$$DockWidgetFloatable$$$DockWidgetVerticalTitleBar$$$DockWidgetFeatureMask$$$AllDockWidgetFeatures$$$NoDockWidgetFeatures$$$Reserved -->
<h3 class="flags" id="DockWidgetFeature-enum"><a name="DockWidgetFeature-enum"></a>enum QDockWidget::<span class="name">DockWidgetFeature</span><br/>flags QDockWidget::<span class="name">DockWidgetFeatures</span></h3>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QDockWidget::DockWidgetClosable</code></td><td class="topAlign tblval"><code>0x01</code></td><td class="topAlign">The dock widget can be closed. On some systems the dock widget always has a close button when it's floating (for example on MacOS 10.5).</td></tr>
<tr><td class="topAlign"><code>QDockWidget::DockWidgetMovable</code></td><td class="topAlign tblval"><code>0x02</code></td><td class="topAlign">The dock widget can be moved between docks by the user.</td></tr>
<tr><td class="topAlign"><code>QDockWidget::DockWidgetFloatable</code></td><td class="topAlign tblval"><code>0x04</code></td><td class="topAlign">The dock widget can be detached from the main window, and floated as an independent window.</td></tr>
<tr><td class="topAlign"><code>QDockWidget::DockWidgetVerticalTitleBar</code></td><td class="topAlign tblval"><code>0x08</code></td><td class="topAlign">The dock widget displays a vertical title bar on its left side. This can be used to increase the amount of vertical space in a <a href="qmainwindow.html">QMainWindow</a>.</td></tr>
<tr><td class="topAlign"><code>QDockWidget::AllDockWidgetFeatures</code></td><td class="topAlign tblval"><code>DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable</code></td><td class="topAlign">(Deprecated) The dock widget can be closed, moved, and floated. Since new features might be added in future releases, the look and behavior of dock widgets might change if you use this flag. Please specify individual flags instead.</td></tr>
<tr><td class="topAlign"><code>QDockWidget::NoDockWidgetFeatures</code></td><td class="topAlign tblval"><code>0x00</code></td><td class="topAlign">The dock widget cannot be closed, moved, or floated.</td></tr>
</table></div>
<p>The DockWidgetFeatures type is a typedef for <a href="../qtcore/qflags.html">QFlags</a>&lt;DockWidgetFeature&gt;. It stores an OR combination of DockWidgetFeature values.</p>
<!-- @@@DockWidgetFeature -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$allowedAreas-prop$$$allowedAreas$$$setAllowedAreasQt::DockWidgetAreas$$$allowedAreasChangedQt::DockWidgetAreas -->
<h3 class="fn" id="allowedAreas-prop"><a name="allowedAreas-prop"></a><span class="name">allowedAreas</span> : <span class="type"><a href="../qtcore/qt.html#DockWidgetArea-enum">Qt::DockWidgetAreas</a></span></h3>
<p>areas where the dock widget may be placed</p>
<p>The default is <a href="../qtcore/qt.html#DockWidgetArea-enum">Qt::AllDockWidgetAreas</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::DockWidgetAreas </td><td class="memItemRight bottomAlign"><span class="name"><b>allowedAreas</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAllowedAreas</b></span>(Qt::DockWidgetAreas <i>areas</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qdockwidget.html#allowedAreasChanged">allowedAreasChanged</a></b></span>(Qt::DockWidgetAreas <i>allowedAreas</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="../qtcore/qt.html#DockWidgetArea-enum">Qt::DockWidgetArea</a>.</p>
<!-- @@@allowedAreas -->
<!-- $$$features-prop$$$features$$$setFeaturesDockWidgetFeatures$$$featuresChangedQDockWidget::DockWidgetFeatures -->
<h3 class="fn" id="features-prop"><a name="features-prop"></a><span class="name">features</span> : <span class="type"><a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeatures</a></span></h3>
<p>This property holds whether the dock widget is movable, closable, and floatable</p>
<p>By default, this property is set to a combination of <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetClosable</a>, <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetMovable</a> and <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFloatable</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> DockWidgetFeatures </td><td class="memItemRight bottomAlign"><span class="name"><b>features</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFeatures</b></span>(DockWidgetFeatures <i>features</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qdockwidget.html#featuresChanged">featuresChanged</a></b></span>(QDockWidget::DockWidgetFeatures <i>features</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetFeature</a>.</p>
<!-- @@@features -->
<!-- $$$floating-prop$$$isFloating$$$setFloatingbool -->
<h3 class="fn" id="floating-prop"><a name="floating-prop"></a><span class="name">floating</span> : <span class="type">bool</span></h3>
<p>This property holds whether the dock widget is floating</p>
<p>A floating dock widget is presented to the user as an independent window &quot;on top&quot; of its parent <a href="qmainwindow.html">QMainWindow</a>, instead of being docked in the <a href="qmainwindow.html">QMainWindow</a>.</p>
<p>By default, this property is <code>true</code>.</p>
<p>When this property changes, the <code>topLevelChanged()</code> signal is emitted.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isFloating</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFloating</b></span>(bool <i>floating</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qwidget.html#isWindow">isWindow</a>() and <a href="qdockwidget.html#topLevelChanged">topLevelChanged</a>().</p>
<!-- @@@floating -->
<!-- $$$windowTitle-prop$$$windowTitle$$$setWindowTitleconstQString&$$$windowTitleChangedconstQString& -->
<h3 class="fn" id="windowTitle-prop"><a name="windowTitle-prop"></a><span class="name">windowTitle</span> : <span class="type"><a href="../qtcore/qstring.html">QString</a></span></h3>
<p>This property holds the dock widget title (caption)</p>
<p>By default, this property contains an empty string.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qwidget.html#windowTitle-prop">windowTitle</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qwidget.html#windowTitle-prop">setWindowTitle</a></b></span>(<i>const QString &amp;</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qwidget.html#windowTitleChanged">windowTitleChanged</a></b></span>(const QString &amp;<i>title</i>)</td></tr>
</table></div>
<!-- @@@windowTitle -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QDockWidget[overload1]$$$QDockWidgetconstQString&QWidget*Qt::WindowFlags -->
<h3 class="fn" id="QDockWidget"><a name="QDockWidget"></a>QDockWidget::<span class="name">QDockWidget</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>title</i>, <span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = Q_NULLPTR, <span class="type"><a href="../qtcore/qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>flags</i> = Qt::WindowFlags())</h3>
<p>Constructs a <a href="qdockwidget.html">QDockWidget</a> with parent <i>parent</i> and window flags <i>flags</i>. The dock widget will be placed in the left dock widget area.</p>
<p>The window title is set to <i>title</i>. This title is used when the <a href="qdockwidget.html">QDockWidget</a> is docked and undocked. It is also used in the context menu provided by <a href="qmainwindow.html">QMainWindow</a>.</p>
<p><b>See also </b><a href="qwidget.html#windowTitle-prop">setWindowTitle</a>().</p>
<!-- @@@QDockWidget -->
<!-- $$$QDockWidget$$$QDockWidgetQWidget*Qt::WindowFlags -->
<h3 class="fn" id="QDockWidget-1"><a name="QDockWidget-1"></a>QDockWidget::<span class="name">QDockWidget</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = Q_NULLPTR, <span class="type"><a href="../qtcore/qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>flags</i> = Qt::WindowFlags())</h3>
<p>Constructs a <a href="qdockwidget.html">QDockWidget</a> with parent <i>parent</i> and window flags <i>flags</i>. The dock widget will be placed in the left dock widget area.</p>
<!-- @@@QDockWidget -->
<!-- $$$~QDockWidget[overload1]$$$~QDockWidget -->
<h3 class="fn" id="dtor.QDockWidget"><a name="dtor.QDockWidget"></a>QDockWidget::<span class="name">~QDockWidget</span>()</h3>
<p>Destroys the dock widget.</p>
<!-- @@@~QDockWidget -->
<!-- $$$allowedAreasChanged -->
<h3 class="fn" id="allowedAreasChanged"><a name="allowedAreasChanged"></a><code>[signal] </code><span class="type">void</span> QDockWidget::<span class="name">allowedAreasChanged</span>(<span class="type"><a href="../qtcore/qt.html#DockWidgetArea-enum">Qt::DockWidgetAreas</a></span> <i>allowedAreas</i>)</h3>
<p>This signal is emitted when the <a href="qdockwidget.html#allowedAreas-prop">allowedAreas</a> property changes. The <i>allowedAreas</i> parameter gives the new value of the property.</p>
<p><b>Note:</b> Notifier signal for property <a href="qdockwidget.html#allowedAreas-prop">allowedAreas</a>. </p><!-- @@@allowedAreasChanged -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn" id="changeEvent"><a name="changeEvent"></a><code>[virtual protected] </code><span class="type">void</span> QDockWidget::<span class="name">changeEvent</span>(<span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$closeEvent[overload1]$$$closeEventQCloseEvent* -->
<h3 class="fn" id="closeEvent"><a name="closeEvent"></a><code>[virtual protected] </code><span class="type">void</span> QDockWidget::<span class="name">closeEvent</span>(<span class="type"><a href="../qtgui/qcloseevent.html">QCloseEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#closeEvent">QWidget::closeEvent</a>().</p>
<!-- @@@closeEvent -->
<!-- $$$dockLocationChanged[overload1]$$$dockLocationChangedQt::DockWidgetArea -->
<h3 class="fn" id="dockLocationChanged"><a name="dockLocationChanged"></a><code>[signal] </code><span class="type">void</span> QDockWidget::<span class="name">dockLocationChanged</span>(<span class="type"><a href="../qtcore/qt.html#DockWidgetArea-enum">Qt::DockWidgetArea</a></span> <i>area</i>)</h3>
<p>This signal is emitted when the dock widget is moved to another dock <i>area</i>, or is moved to a different location in its current dock area. This happens when the dock widget is moved programmatically or is dragged to a new location by the user.</p>
<p>This function was introduced in  Qt 4.3.</p>
<!-- @@@dockLocationChanged -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn" id="event"><a name="event"></a><code>[virtual protected] </code><span class="type">bool</span> QDockWidget::<span class="name">event</span>(<span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="../qtcore/qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$featuresChanged -->
<h3 class="fn" id="featuresChanged"><a name="featuresChanged"></a><code>[signal] </code><span class="type">void</span> QDockWidget::<span class="name">featuresChanged</span>(<span class="type"><a href="qdockwidget.html#DockWidgetFeature-enum">QDockWidget::DockWidgetFeatures</a></span> <i>features</i>)</h3>
<p>This signal is emitted when the <a href="qdockwidget.html#features-prop">features</a> property changes. The <i>features</i> parameter gives the new value of the property.</p>
<p><b>Note:</b> Notifier signal for property <a href="qdockwidget.html#features-prop">features</a>. </p><!-- @@@featuresChanged -->
<!-- $$$initStyleOption[overload1]$$$initStyleOptionQStyleOptionDockWidget* -->
<h3 class="fn" id="initStyleOption"><a name="initStyleOption"></a><code>[protected] </code><span class="type">void</span> QDockWidget::<span class="name">initStyleOption</span>(<span class="type"><a href="qstyleoptiondockwidget.html">QStyleOptionDockWidget</a></span> *<i>option</i>) const</h3>
<p>Initialize <i>option</i> with the values from this <a href="qdockwidget.html">QDockWidget</a>. This method is useful for subclasses when they need a <a href="qstyleoptiondockwidget.html">QStyleOptionDockWidget</a>, but don't want to fill in all the information themselves.</p>
<p><b>See also </b><a href="qstyleoption.html#initFrom">QStyleOption::initFrom</a>().</p>
<!-- @@@initStyleOption -->
<!-- $$$isAreaAllowed[overload1]$$$isAreaAllowedQt::DockWidgetArea -->
<h3 class="fn" id="isAreaAllowed"><a name="isAreaAllowed"></a><span class="type">bool</span> QDockWidget::<span class="name">isAreaAllowed</span>(<span class="type"><a href="../qtcore/qt.html#DockWidgetArea-enum">Qt::DockWidgetArea</a></span> <i>area</i>) const</h3>
<p>Returns <code>true</code> if this dock widget can be placed in the given <i>area</i>; otherwise returns <code>false</code>.</p>
<!-- @@@isAreaAllowed -->
<!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* -->
<h3 class="fn" id="paintEvent"><a name="paintEvent"></a><code>[virtual protected] </code><span class="type">void</span> QDockWidget::<span class="name">paintEvent</span>(<span class="type"><a href="../qtgui/qpaintevent.html">QPaintEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<!-- @@@paintEvent -->
<!-- $$$setTitleBarWidget[overload1]$$$setTitleBarWidgetQWidget* -->
<h3 class="fn" id="setTitleBarWidget"><a name="setTitleBarWidget"></a><span class="type">void</span> QDockWidget::<span class="name">setTitleBarWidget</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>)</h3>
<p>Sets an arbitrary <i>widget</i> as the dock widget's title bar. If <i>widget</i> 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.</p>
<p>If a title bar widget is set, <a href="qdockwidget.html">QDockWidget</a> will not use native window decorations when it is floated.</p>
<p>Here are some tips for implementing custom title bars:</p>
<ul>
<li>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 <a href="qdockwidget.html">QDockWidget</a> parent, which handles them in the usual manner, moving when the title bar is dragged, docking and undocking when it is double-clicked, etc.</li>
<li>When <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetVerticalTitleBar</a> is set on <a href="qdockwidget.html">QDockWidget</a>, the title bar widget is repositioned accordingly. In <a href="qwidget.html#resizeEvent">resizeEvent</a>(), the title bar should check what orientation it should assume:<pre class="cpp">

  <span class="type"><a href="qdockwidget.html#QDockWidget">QDockWidget</a></span> <span class="operator">*</span>dockWidget <span class="operator">=</span> qobject_cast<span class="operator">&lt;</span><span class="type"><a href="qdockwidget.html#QDockWidget">QDockWidget</a></span><span class="operator">*</span><span class="operator">&gt;</span>(parentWidget());
  <span class="keyword">if</span> (dockWidget<span class="operator">-</span><span class="operator">&gt;</span>features() <span class="operator">&amp;</span> <span class="type"><a href="qdockwidget.html#QDockWidget">QDockWidget</a></span><span class="operator">::</span>DockWidgetVerticalTitleBar) {
      <span class="comment">// I need to be vertical</span>
  } <span class="keyword">else</span> {
      <span class="comment">// I need to be horizontal</span>
  }

</pre>
</li>
<li>The title bar widget must have a valid <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>() and <a href="qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>(). These functions should take into account the current orientation of the title bar.</li>
<li>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 <a href="qwidget.html">QWidget</a> as the title bar widget.</li>
</ul>
<p>Using <a href="../qtcore/qobject.html#qobject_cast">qobject_cast</a>() as shown above, the title bar widget has full access to its parent <a href="qdockwidget.html">QDockWidget</a>. Hence it can perform such operations as docking and hiding in response to user actions.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qdockwidget.html#titleBarWidget">titleBarWidget</a>() and <a href="qdockwidget.html#DockWidgetFeature-enum">DockWidgetVerticalTitleBar</a>.</p>
<!-- @@@setTitleBarWidget -->
<!-- $$$setWidget[overload1]$$$setWidgetQWidget* -->
<h3 class="fn" id="setWidget"><a name="setWidget"></a><span class="type">void</span> QDockWidget::<span class="name">setWidget</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>)</h3>
<p>Sets the widget for the dock widget to <i>widget</i>.</p>
<p>If the dock widget is visible when <i>widget</i> is added, you must <a href="qwidget.html#show">show()</a> it explicitly.</p>
<p>Note that you must add the layout of the <i>widget</i> before you call this function; if not, the <i>widget</i> will not be visible.</p>
<p><b>See also </b><a href="qdockwidget.html#widget">widget</a>().</p>
<!-- @@@setWidget -->
<!-- $$$titleBarWidget[overload1]$$$titleBarWidget -->
<h3 class="fn" id="titleBarWidget"><a name="titleBarWidget"></a><span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *QDockWidget::<span class="name">titleBarWidget</span>() const</h3>
<p>Returns the custom title bar widget set on the <a href="qdockwidget.html">QDockWidget</a>, or 0 if no custom title bar has been set.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qdockwidget.html#setTitleBarWidget">setTitleBarWidget</a>().</p>
<!-- @@@titleBarWidget -->
<!-- $$$toggleViewAction[overload1]$$$toggleViewAction -->
<h3 class="fn" id="toggleViewAction"><a name="toggleViewAction"></a><span class="type"><a href="qaction.html">QAction</a></span> *QDockWidget::<span class="name">toggleViewAction</span>() const</h3>
<p>Returns a checkable action that can be used to show or close this dock widget.</p>
<p>The action's text is set to the dock widget's window title.</p>
<p><b>See also </b><a href="qaction.html#text-prop">QAction::text</a> and <a href="qwidget.html#windowTitle-prop">QWidget::windowTitle</a>.</p>
<!-- @@@toggleViewAction -->
<!-- $$$topLevelChanged[overload1]$$$topLevelChangedbool -->
<h3 class="fn" id="topLevelChanged"><a name="topLevelChanged"></a><code>[signal] </code><span class="type">void</span> QDockWidget::<span class="name">topLevelChanged</span>(<span class="type">bool</span> <i>topLevel</i>)</h3>
<p>This signal is emitted when the <a href="qdockwidget.html#floating-prop">floating</a> property changes. The <i>topLevel</i> parameter is true if the dock widget is now floating; otherwise it is false.</p>
<p><b>See also </b><a href="qwidget.html#isWindow">isWindow</a>().</p>
<!-- @@@topLevelChanged -->
<!-- $$$visibilityChanged[overload1]$$$visibilityChangedbool -->
<h3 class="fn" id="visibilityChanged"><a name="visibilityChanged"></a><code>[signal] </code><span class="type">void</span> QDockWidget::<span class="name">visibilityChanged</span>(<span class="type">bool</span> <i>visible</i>)</h3>
<p>This signal is emitted when the dock widget becomes <i>visible</i> (or invisible). This happens when the widget is hidden or shown, as well as when it is docked in a tabbed dock area and its tab becomes selected or unselected.</p>
<p>This function was introduced in  Qt 4.3.</p>
<!-- @@@visibilityChanged -->
<!-- $$$widget[overload1]$$$widget -->
<h3 class="fn" id="widget"><a name="widget"></a><span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *QDockWidget::<span class="name">widget</span>() const</h3>
<p>Returns the widget for the dock widget. This function returns zero if the widget has not been set.</p>
<p><b>See also </b><a href="qdockwidget.html#setWidget">setWidget</a>().</p>
<!-- @@@widget -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>