/usr/share/qt5/doc/qtquickcontrols/qml-qtquick-controls-exclusivegroup.html is in qtquickcontrols5-doc-html 5.3.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" />
<!-- qquickexclusivegroup.cpp -->
<title>ExclusiveGroup QML Type | QtQuickControls 5.3</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li>Qt 5.3</li>
<li><a href="qtquickcontrols-index.html">Qt Quick Controls</a></li>
<li><a href="qtquick-controls-qmlmodule.html">QML Types</a></li>
<li>ExclusiveGroup QML Type</li>
<li id="buildversion">
Qt 5.3.2 Reference Documentation</li>
</ul>
</div>
</div>
<div class="content">
<div class="line">
<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="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#adding-support-to-exclusivegroup">Adding support to ExclusiveGroup</a></li>
</ul>
</div>
<h1 class="title">ExclusiveGroup QML Type</h1>
<span class="subtitle"></span>
<!-- $$$ExclusiveGroup-brief -->
<p>ExclusiveGroup provides a way to declare several checkable controls as mutually exclusive. <a href="#details">More...</a></p>
<!-- @@@ExclusiveGroup -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> </b><tt>import QtQuick.Controls 1.2</tt></td></tr></table><ul>
<li><a href="qml-qtquick-controls-exclusivegroup-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-controls-exclusivegroup.html#current-prop">current</a></b></b> : object</li>
</ul>
<a name="methods"></a>
<h2>Methods</h2>
<ul>
<li class="fn">void <b><b><a href="qml-qtquick-controls-exclusivegroup.html#bindCheckable-method">bindCheckable</a></b></b>(object)</li>
<li class="fn">void <b><b><a href="qml-qtquick-controls-exclusivegroup.html#unbindCheckable-method">unbindCheckable</a></b></b>(object)</li>
</ul>
<!-- $$$ExclusiveGroup-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>ExclusiveGroup can contain several <a href="qml-qtquick-controls-action.html">Action</a> items, and those will automatically get their <a href="qml-qtquick-controls-action.html#exclusiveGroup-prop">Action::exclusiveGroup</a> property assigned.</p>
<pre class="cpp">ExclusiveGroup {
id: radioInputGroup
Action {
id: dabRadioInput
text: <span class="string">"DAB"</span>
checkable: <span class="keyword">true</span>
}
Action {
id: fmRadioInput
text: <span class="string">"FM"</span>
checkable: <span class="keyword">true</span>
}
Action {
id: amRadioInput
text: <span class="string">"AM"</span>
checkable: <span class="keyword">true</span>
}
}</pre>
<p>Several controls already support ExclusiveGroup, e.g. <a href="qml-qtquick-controls-action.html">Action</a>, <a href="qml-qtquick-controls-menuitem.html">MenuItem</a>, <a href="qml-qtquick-controls-button.html">Button</a>, and <a href="qml-qtquick-controls-radiobutton.html">RadioButton</a>.</p>
<p>As ExclusiveGroup only supports <a href="qml-qtquick-controls-action.html">Action</a> as child items, we need to manually assign the <tt>exclusiveGroup</tt> property for other objects.</p>
<pre class="cpp">GroupBox {
id: group2
title: qsTr(<span class="string">"Tab Position"</span>)
Layout<span class="operator">.</span>fillWidth: <span class="keyword">true</span>
RowLayout {
ExclusiveGroup { id: tabPositionGroup }
RadioButton {
id: topButton
text: qsTr(<span class="string">"Top"</span>)
checked: <span class="keyword">true</span>
exclusiveGroup: tabPositionGroup
Layout<span class="operator">.</span>minimumWidth: <span class="number">100</span>
}
RadioButton {
id: bottomButton
text: qsTr(<span class="string">"Bottom"</span>)
exclusiveGroup: tabPositionGroup
Layout<span class="operator">.</span>minimumWidth: <span class="number">100</span>
}
}
}</pre>
<a name="adding-support-to-exclusivegroup"></a>
<h2>Adding support to ExclusiveGroup</h2>
<p>It is possible to add support for ExclusiveGroup for an object or control. It should have a <tt>checked</tt> property, and either a <tt>checkedChanged</tt>, <tt>toggled()</tt>, or <tt>toggled(bool)</tt> signal. It also needs to be bound with <a href="qml-qtquick-controls-exclusivegroup.html#bindCheckable-method">ExclusiveGroup::bindCheckable()</a> when its ExclusiveGroup typed property is set.</p>
<pre class="cpp">Item {
id: myItem
property bool checked: <span class="keyword">false</span>
property ExclusiveGroup exclusiveGroup: null
onExclusiveGroupChanged: {
<span class="keyword">if</span> (exclusiveGroup)
exclusiveGroup<span class="operator">.</span>bindCheckable(myItem)
}
}</pre>
<p>The example above shows the minimum code necessary to add ExclusiveGroup support to any item.</p>
<!-- @@@ExclusiveGroup -->
<h2>Property Documentation</h2>
<!-- $$$current -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="current-prop"></a><span class="name">current</span> : <span class="type">object</span></p></td></tr></table></div><div class="qmldoc"><p>The currently selected object. Defaults to the first checked object bound to the <a href="qml-qtquick-controls-exclusivegroup.html">ExclusiveGroup</a>. If there is none, then it defaults to <tt>null</tt>.</p>
</div></div><!-- @@@current -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$bindCheckable -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="bindCheckable-method"></a><span class="type">void</span> <span class="name">bindCheckable</span>(<span class="type">object</span>)</p></td></tr></table></div><div class="qmldoc"><p>Register <tt>object</tt> to the exclusive group.</p>
<p>You should only need to call this function when creating a component you want to be compatible with <tt>ExclusiveGroup</tt>.</p>
<p><b>See also </b><a href="qml-qtquick-controls-exclusivegroup.html#unbindCheckable-method">ExclusiveGroup::unbindCheckable()</a>.</p>
</div></div><!-- @@@bindCheckable -->
<br/>
<!-- $$$unbindCheckable -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="unbindCheckable-method"></a><span class="type">void</span> <span class="name">unbindCheckable</span>(<span class="type">object</span>)</p></td></tr></table></div><div class="qmldoc"><p>Unregister <tt>object</tt> from the exclusive group.</p>
<p>You should only need to call this function when creating a component you want to be compatible with <tt>ExclusiveGroup</tt>.</p>
<p><b>See also </b><a href="qml-qtquick-controls-exclusivegroup.html#bindCheckable-method">ExclusiveGroup::bindCheckable()</a>.</p>
</div></div><!-- @@@unbindCheckable -->
<br/>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2014 Digia Plc and/or its
subsidiaries. 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> 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. </p>
</div>
</body>
</html>
|