<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qgroupbox.cpp --> <title>Qt 4.8: QGroupBox Class Reference</title> <link rel="stylesheet" type="text/css" href="style/style.css" /> <script src="scripts/jquery.js" type="text/javascript"></script> <script src="scripts/functions.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="style/superfish.css" /> <link rel="stylesheet" type="text/css" href="style/narrow.css" /> <!--[if IE]> <meta name="MSSmartTagsPreventParsing" content="true"> <meta http-equiv="imagetoolbar" content="no"> <![endif]--> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie6.css"> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie7.css"> <![endif]--> <!--[if IE 8]> <link rel="stylesheet" type="text/css" href="style/style_ie8.css"> <![endif]--> <script src="scripts/superfish.js" type="text/javascript"></script> <script src="scripts/narrow.js" type="text/javascript"></script> </head> <body class="" onload="CheckEmptyAndLoadList();"> <div class="header" id="qtdocheader"> <div class="content"> <div id="nav-logo"> <a href="index.html">Home</a></div> <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a> <div id="narrowsearch"></div> <div id="nav-topright"> <ul> <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li> <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li> <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/"> DOC</a></li> <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li> </ul> </div> <div id="shortCut"> <ul> <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li> <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS </a></li> </ul> </div> <ul class="sf-menu" id="narrowmenu"> <li><a href="#">API Lookup</a> <ul> <li><a href="classes.html">Class index</a></li> <li><a href="functions.html">Function index</a></li> <li><a href="modules.html">Modules</a></li> <li><a href="namespaces.html">Namespaces</a></li> <li><a href="qtglobal.html">Global Declarations</a></li> <li><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </li> <li><a href="#">Qt Topics</a> <ul> <li><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li><a href="supported-platforms.html">Supported Platforms</a></li> <li><a href="technology-apis.html">Qt and Key Technologies</a></li> <li><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </li> <li><a href="#">Examples</a> <ul> <li><a href="all-examples.html">Examples</a></li> <li><a href="tutorials.html">Tutorials</a></li> <li><a href="demos.html">Demos</a></li> <li><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </li> </ul> </div> </div> <div class="wrapper"> <div class="hd"> <span></span> </div> <div class="bd group"> <div class="sidebar"> <div class="searchlabel"> Search index:</div> <div class="search" id="sidebarsearch"> <form id="qtdocsearch" action="" onsubmit="return false;"> <fieldset> <input type="text" name="searchstring" id="pageType" value="" /> <div id="resultdialog"> <a href="#" id="resultclose">Close</a> <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span> results:</p> <ul id="resultlist" class="all"> </ul> </div> </fieldset> </form> </div> <div class="box first bottombar" id="lookup"> <h2 title="API Lookup"><span></span> API Lookup</h2> <div id="list001" class="list"> <ul id="ul001" > <li class="defaultLink"><a href="classes.html">Class index</a></li> <li class="defaultLink"><a href="functions.html">Function index</a></li> <li class="defaultLink"><a href="modules.html">Modules</a></li> <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li> <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li> <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </div> </div> <div class="box bottombar" id="topics"> <h2 title="Qt Topics"><span></span> Qt Topics</h2> <div id="list002" class="list"> <ul id="ul002" > <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li class="defaultLink"><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li> <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </div> </div> <div class="box" id="examples"> <h2 title="Examples"><span></span> Examples</h2> <div id="list003" class="list"> <ul id="ul003"> <li class="defaultLink"><a href="all-examples.html">Examples</a></li> <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li> <li class="defaultLink"><a href="demos.html">Demos</a></li> <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </div> </div> </div> <div class="wrap"> <div class="toolbar"> <div class="breadcrumb toolblock"> <ul> <li class="first"><a href="index.html">Home</a></li> <!-- Breadcrumbs go here --> <li><a href="modules.html">Modules</a></li> <li><a href="qtgui.html">QtGui</a></li> <li>QGroupBox</li> </ul> </div> <div class="toolbuttons toolblock"> <ul> <li id="smallA" class="t_button">A</li> <li id="medA" class="t_button active">A</li> <li id="bigA" class="t_button">A</li> <li id="print" class="t_button"><a href="javascript:this.print();"> <span>Print</span></a></li> </ul> </div> </div> <div class="content mainContent"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <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="#public-slots">Public Slots</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="#details">Detailed Description</a></li> </ul> </div> <h1 class="title">QGroupBox Class Reference</h1> <!-- $$$QGroupBox-brief --> <p>The QGroupBox widget provides a group box frame with a title. <a href="#details">More...</a></p> <!-- @@@QGroupBox --> <pre class="cpp"> <span class="preprocessor">#include <QGroupBox></span></pre><p><b>Inherits: </b><a href="qwidget.html">QWidget</a>.</p> <p><b>Inherited by: </b><a href="q3groupbox.html" class="compat">Q3GroupBox</a>.</p> <ul> <li><a href="qgroupbox-members.html">List of all members, including inherited members</a></li> <li><a href="qgroupbox-qt3.html">Qt 3 support members</a></li> </ul> <a name="properties"></a> <h2>Properties</h2> <table class="propsummary"> <tr><td class="topAlign"><ul> <li class="fn"><b><a href="qgroupbox.html#alignment-prop">alignment</a></b> : Qt::Alignment</li> <li class="fn"><b><a href="qgroupbox.html#checkable-prop">checkable</a></b> : bool</li> <li class="fn"><b><a href="qgroupbox.html#checked-prop">checked</a></b> : bool</li> </ul></td><td class="topAlign"><ul> <li class="fn"><b><a href="qgroupbox.html#flat-prop">flat</a></b> : bool</li> <li class="fn"><b><a href="qgroupbox.html#title-prop">title</a></b> : QString</li> </ul> </td></tr> </table> <ul> <li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li> <li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li> </ul> <a name="public-functions"></a> <h2>Public Functions</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#QGroupBox">QGroupBox</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#QGroupBox-2">QGroupBox</a></b> ( const QString & <i>title</i>, QWidget * <i>parent</i> = 0 )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#dtor.QGroupBox">~QGroupBox</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> Qt::Alignment </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#alignment-prop">alignment</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#checkable-prop">isCheckable</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#checked-prop">isChecked</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#flat-prop">isFlat</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#alignment-prop">setAlignment</a></b> ( int <i>alignment</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#checkable-prop">setCheckable</a></b> ( bool <i>checkable</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#flat-prop">setFlat</a></b> ( bool <i>flat</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#title-prop">setTitle</a></b> ( const QString & <i>title</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#title-prop">title</a></b> () const</td></tr> </table> <a name="reimplemented-public-functions"></a> <h2>Reimplemented Public Functions</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#minimumSizeHint">minimumSizeHint</a></b> () const</td></tr> </table> <ul> <li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li> <li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li> <li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li> </ul> <a name="public-slots"></a> <h2>Public Slots</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#checked-prop">setChecked</a></b> ( bool <i>checked</i> )</td></tr> </table> <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="qobject.html#public-slots">QObject</a></li> </ul> <a name="signals"></a> <h2>Signals</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#clicked">clicked</a></b> ( bool <i>checked</i> = false )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#toggled">toggled</a></b> ( bool <i>on</i> )</td></tr> </table> <ul> <li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li> <li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li> </ul> <a name="protected-functions"></a> <h2>Protected Functions</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#initStyleOption">initStyleOption</a></b> ( QStyleOptionGroupBox * <i>option</i> ) const</td></tr> </table> <a name="reimplemented-protected-functions"></a> <h2>Reimplemented Protected Functions</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#changeEvent">changeEvent</a></b> ( QEvent * <i>ev</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#childEvent">childEvent</a></b> ( QChildEvent * <i>c</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#event">event</a></b> ( QEvent * <i>e</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>fe</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#mouseMoveEvent">mouseMoveEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#mousePressEvent">mousePressEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>event</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgroupbox.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>e</i> )</td></tr> </table> <ul> <li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li> <li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li> <li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li> <li class="fn">7 static public members inherited from <a href="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> </ul> <a name="details"></a> <!-- $$$QGroupBox-description --> <div class="descr"> <h2>Detailed Description</h2> <p>The QGroupBox widget provides a group box frame with a title.</p> <p>A group box provides a frame, a title and a keyboard shortcut, and displays various other widgets inside itself. The title is on top, the keyboard shortcut moves keyboard focus to one of the group box's child widgets.</p> <p>QGroupBox also lets you set the <a href="qgroupbox.html#title-prop">title</a> (normally set in the constructor) and the title's <a href="qgroupbox.html#alignment-prop">alignment</a>. Group boxes can be <a href="qgroupbox.html#checkable-prop">checkable</a>; child widgets in checkable group boxes are enabled or disabled depending on whether or not the group box is <a href="qgroupbox.html#checked-prop">checked</a>.</p> <p>You can minimize the space consumption of a group box by enabling the <a href="qgroupbox.html#flat-prop">flat</a> property. In most <a href="qstyle.html">styles</a>, enabling this property results in the removal of the left, right and bottom edges of the frame.</p> <p>QGroupBox doesn't automatically lay out the child widgets (which are often <a href="qcheckbox.html">QCheckBox</a>es or <a href="qradiobutton.html">QRadioButton</a>s but can be any widgets). The following example shows how we can set up a QGroupBox with a layout:</p> <pre class="cpp"> <span class="type">QGroupBox</span> <span class="operator">*</span>groupBox <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QGroupBox</span>(tr(<span class="string">"Exclusive Radio Buttons"</span>)); <span class="type"><a href="qradiobutton.html">QRadioButton</a></span> <span class="operator">*</span>radio1 <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qradiobutton.html">QRadioButton</a></span>(tr(<span class="string">"&Radio button 1"</span>)); <span class="type"><a href="qradiobutton.html">QRadioButton</a></span> <span class="operator">*</span>radio2 <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qradiobutton.html">QRadioButton</a></span>(tr(<span class="string">"R&adio button 2"</span>)); <span class="type"><a href="qradiobutton.html">QRadioButton</a></span> <span class="operator">*</span>radio3 <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qradiobutton.html">QRadioButton</a></span>(tr(<span class="string">"Ra&dio button 3"</span>)); radio1<span class="operator">-</span><span class="operator">></span>setChecked(<span class="keyword">true</span>); <span class="type"><a href="qvboxlayout.html">QVBoxLayout</a></span> <span class="operator">*</span>vbox <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qvboxlayout.html">QVBoxLayout</a></span>; vbox<span class="operator">-</span><span class="operator">></span>addWidget(radio1); vbox<span class="operator">-</span><span class="operator">></span>addWidget(radio2); vbox<span class="operator">-</span><span class="operator">></span>addWidget(radio3); vbox<span class="operator">-</span><span class="operator">></span>addStretch(<span class="number">1</span>); groupBox<span class="operator">-</span><span class="operator">></span>setLayout(vbox);</pre> <table class="generic" width="100%"> <tr valign="top" class="odd"><td ><img src="images/windowsxp-groupbox.png" alt="Screenshot of a Windows XP style group box" /></td><td ><img src="images/macintosh-groupbox.png" alt="Screenshot of a Macintosh style group box" /></td><td ><img src="images/plastique-groupbox.png" alt="Screenshot of a Plastique style group box" /></td></tr> <tr valign="top" class="even"><td >A <a href="gallery-windowsxp.html">Windows XP style</a> group box.</td><td >A <a href="gallery-macintosh.html">Macintosh style</a> group box.</td><td >A <a href="gallery-plastique.html">Plastique style</a> group box.</td></tr> </table> </div> <p><b>See also </b><a href="qbuttongroup.html">QButtonGroup</a> and <a href="widgets-groupbox.html">Group Box Example</a>.</p> <!-- @@@QGroupBox --> <div class="prop"> <h2>Property Documentation</h2> <!-- $$$alignment-prop$$$alignment$$$setAlignmentint --> <h3 class="fn"><a name="alignment-prop"></a><span class="name">alignment</span> : <span class="type"><a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a></span></h3> <p>This property holds the alignment of the group box title.</p> <p>Most styles place the title at the top of the frame. The horizontal alignment of the title can be specified using single values from the following list:</p> <ul> <li><a href="qt.html#AlignmentFlag-enum">Qt::AlignLeft</a> aligns the title text with the left-hand side of the group box.</li> <li><a href="qt.html#AlignmentFlag-enum">Qt::AlignRight</a> aligns the title text with the right-hand side of the group box.</li> <li><a href="qt.html#AlignmentFlag-enum">Qt::AlignHCenter</a> aligns the title text with the horizontal center of the group box.</li> </ul> <p>The default alignment is <a href="qt.html#AlignmentFlag-enum">Qt::AlignLeft</a>.</p> <p><b>Access functions:</b></p> <table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> Qt::Alignment </td><td class="memItemRight bottomAlign"><span class="name"><b>alignment</b></span> () const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAlignment</b></span> ( int <i>alignment</i> )</td></tr> </table> <p><b>See also </b><a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a>.</p> <!-- @@@alignment --> <!-- $$$checkable-prop$$$isCheckable$$$setCheckablebool --> <h3 class="fn"><a name="checkable-prop"></a><span class="name">checkable</span> : <span class="type">bool</span></h3> <p>This property holds whether the group box has a checkbox in its title.</p> <p>If this property is true, the group box displays its title using a checkbox in place of an ordinary label. If the checkbox is checked, the group box's children are enabled; otherwise they are disabled and inaccessible.</p> <p>By default, group boxes are not checkable.</p> <p>If this property is enabled for a group box, it will also be initially checked to ensure that its contents are enabled.</p> <p><b>Access functions:</b></p> <table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isCheckable</b></span> () const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCheckable</b></span> ( bool <i>checkable</i> )</td></tr> </table> <p><b>See also </b><a href="qgroupbox.html#checked-prop">checked</a>.</p> <!-- @@@checkable --> <!-- $$$checked-prop$$$isChecked$$$setCheckedbool$$$toggledbool --> <h3 class="fn"><a name="checked-prop"></a><span class="name">checked</span> : <span class="type">bool</span></h3> <p>This property holds whether the group box is checked.</p> <p>If the group box is checkable, it is displayed with a check box. If the check box is checked, the group box's children are enabled; otherwise the children are disabled and are inaccessible to the user.</p> <p>By default, checkable group boxes are also checked.</p> <p><b>Access functions:</b></p> <table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isChecked</b></span> () const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setChecked</b></span> ( bool <i>checked</i> )</td></tr> </table> <p><b>Notifier signal:</b></p> <table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qgroupbox.html#toggled">toggled</a></b></span> ( bool <i>on</i> )</td></tr> </table> <p><b>See also </b><a href="qgroupbox.html#checkable-prop">checkable</a>.</p> <!-- @@@checked --> <!-- $$$flat-prop$$$isFlat$$$setFlatbool --> <h3 class="fn"><a name="flat-prop"></a><span class="name">flat</span> : <span class="type">bool</span></h3> <p>This property holds whether the group box is painted flat or has a frame.</p> <p>A group box usually consists of a surrounding frame with a title at the top. If this property is enabled, only the top part of the frame is drawn in most styles; otherwise the whole frame is drawn.</p> <p>By default, this property is disabled; i.e. group boxes are not flat unless explicitly specified.</p> <p><b>Note:</b> In some styles, flat and non-flat group boxes have similar representations and may not be as distinguishable as they are in other styles.</p> <p><b>Access functions:</b></p> <table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isFlat</b></span> () const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFlat</b></span> ( bool <i>flat</i> )</td></tr> </table> <p><b>See also </b><a href="qgroupbox.html#title-prop">title</a>.</p> <!-- @@@flat --> <!-- $$$title-prop$$$title$$$setTitleconstQString& --> <h3 class="fn"><a name="title-prop"></a><span class="name">title</span> : <span class="type"><a href="qstring.html">QString</a></span></h3> <p>This property holds the group box title text.</p> <p>The group box title text will have a keyboard shortcut if the title contains an ampersand ('&') followed by a letter.</p> <pre class="cpp"> g<span class="operator">-</span><span class="operator">></span>setTitle(<span class="string">"&User information"</span>);</pre> <p>In the example above, <b>Alt+U</b> moves the keyboard focus to the group box. See the <a href="qshortcut.html#mnemonic">QShortcut</a> documentation for details (to display an actual ampersand, use '&&').</p> <p>There is no default title text.</p> <p><b>Access functions:</b></p> <table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>title</b></span> () const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTitle</b></span> ( const QString & <i>title</i> )</td></tr> </table> <p><b>See also </b><a href="qgroupbox.html#alignment-prop">alignment</a>.</p> <!-- @@@title --> </div> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QGroupBox[overload1]$$$QGroupBoxQWidget* --> <h3 class="fn"><a name="QGroupBox"></a>QGroupBox::<span class="name">QGroupBox</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3> <p>Constructs a group box widget with the given <i>parent</i> but with no title.</p> <!-- @@@QGroupBox --> <!-- $$$QGroupBox$$$QGroupBoxconstQString&QWidget* --> <h3 class="fn"><a name="QGroupBox-2"></a>QGroupBox::<span class="name">QGroupBox</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>title</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3> <p>Constructs a group box with the given <i>title</i> and <i>parent</i>.</p> <!-- @@@QGroupBox --> <!-- $$$~QGroupBox[overload1]$$$~QGroupBox --> <h3 class="fn"><a name="dtor.QGroupBox"></a>QGroupBox::<span class="name">~QGroupBox</span> ()</h3> <p>Destroys the group box.</p> <!-- @@@~QGroupBox --> <!-- $$$changeEvent[overload1]$$$changeEventQEvent* --> <h3 class="fn"><a name="changeEvent"></a><span class="type">void</span> QGroupBox::<span class="name">changeEvent</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>ev</i> )<tt> [virtual protected]</tt></h3> <p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p> <!-- @@@changeEvent --> <!-- $$$childEvent[overload1]$$$childEventQChildEvent* --> <h3 class="fn"><a name="childEvent"></a><span class="type">void</span> QGroupBox::<span class="name">childEvent</span> ( <span class="type"><a href="qchildevent.html">QChildEvent</a></span> * <i>c</i> )<tt> [virtual protected]</tt></h3> <p>Reimplemented from <a href="qobject.html#childEvent">QObject::childEvent</a>().</p> <!-- @@@childEvent --> <!-- $$$clicked[overload1]$$$clickedbool --> <h3 class="fn"><a name="clicked"></a><span class="type">void</span> QGroupBox::<span class="name">clicked</span> ( <span class="type">bool</span> <i>checked</i> = false )<tt> [signal]</tt></h3> <p>This signal is emitted when the check box is activated (i.e. pressed down then released while the mouse cursor is inside the button), or when the shortcut key is typed, Notably, this signal is <i>not</i> emitted if you call <a href="qgroupbox.html#checked-prop">setChecked</a>().</p> <p>If the check box is checked <i>checked</i> is true; it is false if the check box is unchecked.</p> <p>This function was introduced in Qt 4.2.</p> <p><b>See also </b><a href="qgroupbox.html#checkable-prop">checkable</a>, <a href="qgroupbox.html#toggled">toggled</a>(), and <a href="qgroupbox.html#checked-prop">checked</a>.</p> <!-- @@@clicked --> <!-- $$$event[overload1]$$$eventQEvent* --> <h3 class="fn"><a name="event"></a><span class="type">bool</span> QGroupBox::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3> <p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p> <!-- @@@event --> <!-- $$$focusInEvent[overload1]$$$focusInEventQFocusEvent* --> <h3 class="fn"><a name="focusInEvent"></a><span class="type">void</span> QGroupBox::<span class="name">focusInEvent</span> ( <span class="type"><a href="qfocusevent.html">QFocusEvent</a></span> * <i>fe</i> )<tt> [virtual protected]</tt></h3> <p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget::focusInEvent</a>().</p> <!-- @@@focusInEvent --> <!-- $$$initStyleOption[overload1]$$$initStyleOptionQStyleOptionGroupBox* --> <h3 class="fn"><a name="initStyleOption"></a><span class="type">void</span> QGroupBox::<span class="name">initStyleOption</span> ( <span class="type"><a href="qstyleoptiongroupbox.html">QStyleOptionGroupBox</a></span> * <i>option</i> ) const<tt> [protected]</tt></h3> <p>Initialize <i>option</i> with the values from this <a href="qgroupbox.html">QGroupBox</a>. This method is useful for subclasses when they need a <a href="qstyleoptiongroupbox.html">QStyleOptionGroupBox</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 --> <!-- $$$minimumSizeHint[overload1]$$$minimumSizeHint --> <h3 class="fn"><a name="minimumSizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> QGroupBox::<span class="name">minimumSizeHint</span> () const<tt> [virtual]</tt></h3> <p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>().</p> <!-- @@@minimumSizeHint --> <!-- $$$mouseMoveEvent[overload1]$$$mouseMoveEventQMouseEvent* --> <h3 class="fn"><a name="mouseMoveEvent"></a><span class="type">void</span> QGroupBox::<span class="name">mouseMoveEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3> <p>Reimplemented from <a href="qwidget.html#mouseMoveEvent">QWidget::mouseMoveEvent</a>().</p> <!-- @@@mouseMoveEvent --> <!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* --> <h3 class="fn"><a name="mousePressEvent"></a><span class="type">void</span> QGroupBox::<span class="name">mousePressEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3> <p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget::mousePressEvent</a>().</p> <!-- @@@mousePressEvent --> <!-- $$$mouseReleaseEvent[overload1]$$$mouseReleaseEventQMouseEvent* --> <h3 class="fn"><a name="mouseReleaseEvent"></a><span class="type">void</span> QGroupBox::<span class="name">mouseReleaseEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3> <p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget::mouseReleaseEvent</a>().</p> <!-- @@@mouseReleaseEvent --> <!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* --> <h3 class="fn"><a name="paintEvent"></a><span class="type">void</span> QGroupBox::<span class="name">paintEvent</span> ( <span class="type"><a href="qpaintevent.html">QPaintEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3> <p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p> <!-- @@@paintEvent --> <!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* --> <h3 class="fn"><a name="resizeEvent"></a><span class="type">void</span> QGroupBox::<span class="name">resizeEvent</span> ( <span class="type"><a href="qresizeevent.html">QResizeEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3> <p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p> <!-- @@@resizeEvent --> <!-- $$$toggled[overload1]$$$toggledbool --> <h3 class="fn"><a name="toggled"></a><span class="type">void</span> QGroupBox::<span class="name">toggled</span> ( <span class="type">bool</span> <i>on</i> )<tt> [signal]</tt></h3> <p>If the group box is checkable, this signal is emitted when the check box is toggled. <i>on</i> is true if the check box is checked; otherwise it is false.</p> <p><b>See also </b><a href="qgroupbox.html#checkable-prop">checkable</a>.</p> <!-- @@@toggled --> </div> </div> </div> </div> <div class="ft"> <span></span> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.</p> <br /> <p> 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.</p> <p> Documentation sources may be obtained from <a href="http://www.qt-project.org"> www.qt-project.org</a>.</p> <br /> <p> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. <a title="Privacy Policy" href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p> </div> <script src="scripts/functions.js" type="text/javascript"></script> </body> </html>