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 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554
|
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>The <widget> Element</title>
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.49">
<link rel="HOME" href="book1.html">
<link rel="UP" title="The File Format Of .ui Files" href="chap9_1.html">
<link rel="PREVIOUS" title="The File Format Of .ui Files" href="chap9_1.html">
<link rel="NEXT" title="The Pixmaps In The <images> Element" href="chap9_3.html">
</head>
<body class="SECT1" bgcolor="white" text="black" link="blue" vlink="#840084" alink="blue">
<div class="NAVHEADER">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="500" align="left" valign="middle"><img height="90" width="475" src="figures/title.png" border="0"></td>
<td></td>
<td align="right" valign="top"> <a href="../company/about/trolls.html">
<table border="0" cellpadding="0" cellspacing="0" width="137">
<tr>
<td><img height="100" width="100" src="figures/f001.png" border="0"></td>
<td><img height="100" width="100" src="figures/qtlogo.png" align="top" border="0"></td>
</tr>
</table>
</a> </td>
</tr>
<tr>
<td width="500"><spacer type="block" width="500" height="20"></td>
<td><spacer type="block" width="42" height="20"></td>
<td><br>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="black">
<tr>
<td width="10%" align="left" valign="bottom"> <a href="chap9_1.html"><img height="20" width="20" src="arrows/left.png" border="0"></a> </td>
<td width="80%" align="center" valign="bottom"><font color="white"><b>Chapter 9. The File Format Of .ui Files</b></font></td>
<td width="10%" align="right" valign="bottom"> <a href="chap9_3.html"><img height="20" width="20" src="arrows/right.png" border="0"></a> </td>
</tr>
</table>
</div>
<div class="SECT1">
<h1 class="SECT1"><a name="QT-DESIGNER-REF-UI-WIDGETELEMENT"></a> The <tt class="LITERAL"><widget></tt> Element</h1>
<p>As its name implies, the widget element describes one widget. At the top level of the <tt class="FILENAME">.ui</tt> file, there must be exactly one such element for the top-level widget of the form, but this element can in turn contain other <tt class="LITERAL"><widget></tt> elements.</p>
<p>A <tt class="LITERAL"><widget></tt> element can have the following subelements:</p>
<dl>
<dt><tt class="LITERAL"><class></tt>
<dd>
<p>There must be exactly one such element that describes the C++ class of the widget (like <tt class="LITERAL">QWidget</tt>).</p>
<dt><tt class="LITERAL"><property></tt>
<dd>
<p>There can be any number of such elements that describe the properties of the widget that differ from the default. See the next section for a description of how <tt class="LITERAL"><property></tt> elements should look.</p>
<dt><tt class="LITERAL"><attribute></tt>
<dd>
<p>There can be any number of such elements that describe the attributes of the widget. Attributes are like properties, but are not defined in the widget and need to be treated specially. This element has the same syntax as the <tt class="LITERAL"><property></tt> element.</p>
<dt><tt class="LITERAL"><item></tt>
<dd>
<p>There can be any number of such elements that describe the items of this widget if the widget can contain items (like list boxes or icon views). See <a href="#QT-DESIGNER-REF-UI-ITEMELEMENT">the section called <i>The <tt class="LITERAL"><item></tt> Element</i></a> for the exact syntax of this item.</p>
<dt><tt class="LITERAL"><column></tt>
<dd>
<p>There can be any number of such elements that describe the columns of this widget if the widget is a list view. See <a href="#QT-DESIGNER-REF-UI-COLUMNELEMENT">the section called <i>The <tt class="LITERAL"><column></tt> Element</i></a> for the exact syntax of this item.</p>
<dt>Child widgets
<dd>
<p>Child widgets can be specified in one of four ways:</p>
<dl>
<dt>Any number of <tt class="LITERAL"><widget></tt> elements
<dd>
<p>If the widget does not use any layout management, then the children are directly specified as <tt class="LITERAL"><widget></tt> elements.</p>
<dt>One <tt class="LITERAL"><hbox></tt> element
<dd>
<p>If the widget uses a horizontal box layout as its outermost layout, then exactly one <tt class="LITERAL"><hbox></tt> is specified, which in turn specifies the child widgets. See <a href="#QT-DESIGNER-REF-UI-HBOXELEMENT">the section called <i>The <tt class="LITERAL"><hbox></tt> Element</i></a> for the exact syntax of this element.</p>
<dt>One <tt class="LITERAL"><vbox></tt> element
<dd>
<p>If the widget uses a vertical box layout as its outermost layout, then exactly one <tt class="LITERAL"><vbox></tt> is specified, which in turn specifies the child widgets. See <a href="#QT-DESIGNER-REF-UI-VBOXELEMENT">the section called <i>The <tt class="LITERAL"><vbox></tt> Element</i></a> for the exact syntax of this element.</p>
<dt>One <tt class="LITERAL"><grid></tt> element
<dd>
<p>If the widget uses a grid layout as its outermost layout, then exactly one <tt class="LITERAL"><grid></tt> is specified, which in turn specifies the child widgets. See <a href="#QT-DESIGNER-REF-UI-GRIDELEMENT">the section called <i>The <tt class="LITERAL"><grid></tt> Element</i></a> for the exact syntax of this element.</p>
</dl>
</dl>
<div class="SECT2">
<h2 class="SECT2"><a name="QT-DESIGNER-REF-UI-PROPERTYELEMENT"></a> The <tt class="LITERAL"><property></tt> Element</h2>
<p>This element describes a property of a widget or a layout. Each property has as its first child a <tt class="LITERAL"><name></tt> element that describes the name of the property (like <tt class="LITERAL">geometry</tt>) and as its second child an element whose name describes the type and whose contents describe the value of the property. <a href="#QT-DESIGNER-TABLE-PROPERTIES">Table 9-1</a> lists the possible type names together with a description of their values.</p>
<div class="TABLE">
<a name="QT-DESIGNER-TABLE-PROPERTIES"></a>
<p><b>Table 9-1. Property Types</b></p>
<p>
<table border="1" class="CALSTABLE">
<tr>
<th align="left" valign="top">Element Name</th>
<th align="left" valign="top">Type</th>
<th align="left" valign="top">Description of the Value</th>
<th align="left" valign="top">Example</th>
</tr>
<tr>
<td align="left" valign="top">string</td>
<td align="left" valign="top">Any Unicode string value (saved in UTF-8)</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top"><string>Some Text</string></td>
</tr>
<tr>
<td align="left" valign="top">cstring</td>
<td align="left" valign="top">Any c-string (8-bit) value</td>
<td align="left" valign="top">CString</td>
<td align="left" valign="top"><string>Some Text</string></td>
</tr>
<tr>
<td align="left" valign="top">bool</td>
<td align="left" valign="top">Any boolean value</td>
<td align="left" valign="top">Bool (1|0)</td>
<td align="left" valign="top"><bool>1</bool></td>
</tr>
<tr>
<td align="left" valign="top">number</td>
<td align="left" valign="top">Any signed numerical value</td>
<td align="left" valign="top">Integer</td>
<td align="left" valign="top"><number>-4</number></td>
</tr>
<tr>
<td align="left" valign="top">number</td>
<td align="left" valign="top">Any unsigned numerical value</td>
<td align="left" valign="top">Unsigned integer</td>
<td align="left" valign="top"><number>1</number></td>
</tr>
<tr>
<td align="left" valign="top">enum</td>
<td align="left" valign="top">Enum key</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top"><enum>StrongFocus</enum></td>
</tr>
<tr>
<td align="left" valign="top">set</td>
<td align="left" valign="top">Set (OR'd integers)</td>
<td align="left" valign="top">StringList joined with '|'</td>
<td align="left" valign="top"><set>AlignLeft|AlignTop|WordWrap</set></td>
</tr>
<tr>
<td align="left" valign="top">rect</td>
<td align="left" valign="top">Rectangles</td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><x>Integer</x><br>
<y>Integer</y><br>
<width>Integer</width><br>
<height>Integer</height><br>
<i class="EMPHASIS">If you leave out one of the elements, the value of it defaults to zero (0).</i></td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><rect><br>
<x>20</x><br>
<y>30</y><br>
<width>200</width><br>
<height>25</height><br>
</rect></td>
</tr>
<tr>
<td align="left" valign="top">point</td>
<td align="left" valign="top">Points (coordinates)</td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><x>Integer</x><br>
<y>Integer</y><br>
<i class="EMPHASIS">If you leave out one of the elements, the value of it defaults to zero (0).</i></td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><point><br>
<x>20</x><br>
<y>30</y><br>
</point></td>
</tr>
<tr>
<td align="left" valign="top">size</td>
<td align="left" valign="top">Sizes</td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><width>Integer</width><br>
<height>Integer</height><br>
<i class="EMPHASIS">If you leave out one of the elements, the value of it defaults to zero (0).</i></td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><size><br>
<width>200</width><br>
<height>25</height><br>
</size></td>
</tr>
<tr>
<td align="left" valign="top">font</td>
<td align="left" valign="top">Font description</td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><family>String</family><br>
<pointsize>Integer</pointsize><br>
<weight>Integer</weight><br>
<italic>Boolean</italic><br>
<underline>Boolean</underline><br>
<strikeout>Boolean</strikeout></td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><font><br>
<family>Times</family><br>
<pointsize>12</pointsize><br>
<weight>50</weight><br>
<italic>1</italic><br>
<underline>0</underline><br>
<strikeout>0</strikeout><br>
</font></td>
</tr>
<tr>
<td align="left" valign="top">color</td>
<td align="left" valign="top">Color description</td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><red>Integer</red><br>
<green>Integer</green><br>
<blue>Integer</blue></td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><color><br>
<red>192</red><br>
<green>200</green><br>
<blue>50</blue><br>
</color></td>
</tr>
<tr>
<td align="left" valign="top">pixmap/image/imageset</td>
<td align="left" valign="top">Pixmap</td>
<td align="left" valign="top">Depending on whether images are saved inline or not (see earlier in the "Header Elements" section), this element looks different:
<dl>
<dt>Inline
<dd>
<p><pixmap><i class="EMPHASIS"><key of pixmap in the pixmap collection></i></pixmap></p>
<p><i class="EMPHASIS">The same is used for saving images and iconsets at the moment; just replace 'pixmap' with 'image' or 'iconset.' There is no special support for icon sets yet.</i></p>
<dt>Not Inline (Function)
<dd>
<p><pixmap><i class="EMPHASIS"><Arguments for pixmap-loading function></i></pixmap></p>
<p><i class="EMPHASIS">The same is used for saving images and iconsets at the moment; just replace 'pixmap' with 'image' or 'iconset.' There is no special support for icon sets.</i>
</dl>
</td>
<td align="left" valign="top"><pixmap>image1</pixmap></td>
</tr>
<tr>
<td align="left" valign="top">sizepolicy</td>
<td align="left" valign="top">SizePolicy (saved as int)</td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><hsizetype>SizeType</hsizetype><br>
<vsizetype>SizeType</vsizetype></p>
<p><i class="EMPHASIS">SizeType is saved as int and can be one of the following:</i></p>
<ul>
<li>
<p>Fixed (0)</p>
<li>
<p>Minimum (1)</p>
<li>
<p>Maximum (4)</p>
<li>
<p>Preferred (5)</p>
<li>
<p>MinimumExpanding (3)</p>
<li>
<p>Expanding (7)
</ul>
</td>
<td align="left" valign="top">
<p class="LITERALLAYOUT"><hsizetype>1</hsizetype><br>
<vsizetype>3</vsizetype></td>
</tr>
<tr>
<td align="left" valign="top">palette</td>
<td align="left" valign="top">Palette</td>
<td align="left" valign="top">
<palette><br>
<active><br>
<color><br>
<i class="EMPHASIS">rgb of Foreground</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of Button</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of Light</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of Midlight</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of Dark</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of Mid</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of Text</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of BrightText</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of ButtonText</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of Base</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of Background</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of Shadow</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of Highlight</i><br>
</color><br>
<color><br>
<i class="EMPHASIS">rgb of HighlightText</i><br>
</color><br>
</active><br>
<disabled><br>
<i class="EMPHASIS">ColorGroup of disabled palette</i><br>
</disabled><br>
<inactive><br>
<i class="EMPHASIS">ColorGroup of inactive palette</i><br>
</inactive><br>
</palette>
</td>
<td align="left" valign="top">
<palette><br>
<active><br>
<color><br>
<red>0</red><br>
<green>0</green><br>
<blue>0</blue><br>
</color><br>
<color><br>
<red>170</red><br>
<green>170</green><br>
<blue>255</blue><br>
</color><br>
<color><br>
<red>255</red><br>
<green>255</green><br>
<blue>255</blue><br>
</color><br>
<color><br>
<red>212</red><br>
<green>212</green><br>
<blue>255</blue><br>
</color><br>
<color><br>
<red>85</red><br>
<green>85</green><br>
<blue>127</blue><br>
</color><br>
<color><br>
<red>113</red><br>
<green>113</green><br>
<blue>170</blue><br>
</color><br>
<color><br>
<red>0</red><br>
<green>0</green><br>
<blue>0</blue><br>
</color><br>
<color><br>
<red>255</red><br>
<green>255</green><br>
<blue>255</blue><br>
</color><br>
<color><br>
<red>0</red><br>
<green>0</green><br>
<blue>0</blue><br>
</color><br>
<color><br>
<red>255</red><br>
<green>255</green><br>
<blue>255</blue><br>
</color><br>
<color><br>
<red>218</red><br>
<green>218</green><br>
<blue>218</blue><br>
</color><br>
<color><br>
<red>0</red><br>
<green>0</green><br>
<blue>0</blue><br>
</color><br>
<color><br>
<red>90</red><br>
<green>36</green><br>
<blue>0</blue><br>
</color><br>
<color><br>
<red>255</red><br>
<green>255</green><br>
<blue>255</blue><br>
</color><br>
</active><br>
<disabled><br>
<i class="EMPHASIS">......</i><br>
</disabled><br>
<inactive><br>
<i class="EMPHASIS">......</i><br>
</inactive><br>
</palette>
</td>
</tr>
<tr>
<td align="left" valign="top">cursor</td>
<td align="left" valign="top">Cursor saved as int</td>
<td align="left" valign="top">
<table border="0">
<tr>
<td><cursor>cursor</cursor></td>
</tr>
</table>
<p><i class="EMPHASIS">The following int values are defined for cursor:</i></p>
<ul>
<li>
<p>ArrowCursor (0)</p>
<li>
<p>UpArrowCursor (1)</p>
<li>
<p>CrossCursor (2)</p>
<li>
<p>WaitCursor (3)</p>
<li>
<p>IbeamCursor (4)</p>
<li>
<p>SizeVerCursor (5)</p>
<li>
<p>SizeHorCursor (6)</p>
<li>
<p>SizeBDiagCursor (7)</p>
<li>
<p>SizeFDiagCursor (8)</p>
<li>
<p>SizeAllCursor (9)</p>
<li>
<p>BlankCursor (10)</p>
<li>
<p>SplitVCursor (11)</p>
<li>
<p>SplitHCursor (12)</p>
<li>
<p>PointingHandCursor (13)</p>
<li>
<p>ForbiddenCursor (14)
</ul>
</td>
<td align="left" valign="top"><cursor>5</cursor></td>
</tr>
</table>
</p>
</div>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="QT-DESIGNER-REF-UI-HBOXELEMENT"></a> The <tt class="LITERAL"><hbox></tt> Element</h2>
<p>This element describes a layout that arranges its children from left to right. It must be a child of a <tt class="LITERAL"><widget></tt> element. This widget is then normally a container widget (e.g., a <tt class="LITERAL">QGroupBox</tt>) or a temporary <tt class="LITERAL">QLayoutWidget</tt>. The following child elements are defined:</p>
<dl>
<dt><tt class="LITERAL"><property></tt>
<dd>
<p>There can be any number of these elements, which describe a property of the layout.</p>
<dt><tt class="LITERAL"><widget></tt>
<dd>
<p>There can be any number of these elements, which describe a child widget that is managed by the layout.</p>
<dt><tt class="LITERAL"><spacer></tt>
<dd>
<p>There can be any number of these elements, which describe a spacer in the layout (see <a href="#QT-DESIGNER-REF-UI-SPACERELEMENT">the section called <i>The <tt class="LITERAL"><spacer></tt> Element</i></a> ).</p>
</dl>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="QT-DESIGNER-REF-UI-VBOXELEMENT"></a> The <tt class="LITERAL"><vbox></tt> Element</h2>
<p>This element describes a layout that arranges its children from top to bottom. It must be a child of a <tt class="LITERAL"><widget></tt> element. This widget is then normally a container widget (e.g., a <tt class="LITERAL">QGroupBox</tt>) or a temporary <tt class="LITERAL">QLayoutWidget</tt>. The following child elements are defined:</p>
<dl>
<dt><tt class="LITERAL"><property></tt>
<dd>
<p>There can be any number of these elements, which describe a property of the layout.</p>
<dt><tt class="LITERAL"><widget></tt>
<dd>
<p>There can be any number of these elements, which describe a child widget that is managed by the layout.</p>
<dt><tt class="LITERAL"><spacer></tt>
<dd>
<p>There can be any number of these elements, which describe a spacer in the layout (see <a href="#QT-DESIGNER-REF-UI-SPACERELEMENT">the section called <i>The <tt class="LITERAL"><spacer></tt> Element</i></a> ).</p>
</dl>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="QT-DESIGNER-REF-UI-GRIDELEMENT"></a> The <tt class="LITERAL"><grid></tt> Element</h2>
<p>This element describes a layout that arranges its children in a grid. It must be a child of a <tt class="LITERAL"><widget></tt> element. This widget is then normally a container widget (e.g., a <tt class="LITERAL">QGroupBox</tt>) or a temporary <tt class="LITERAL">QLayoutWidget</tt>. The following child elements are defined:</p>
<dl>
<dt><tt class="LITERAL"><property></tt>
<dd>
<p>There can be any number of these elements, which describe a property of the layout.</p>
<dt><tt class="LITERAL"><widget></tt>
<dd>
<p>There can be any number of these elements, which describe a child widget that is managed by the layout.</p>
<p>Besides the elements ordinarily defined as subelements of <tt class="LITERAL"><widget></tt>, there can be <tt class="LITERAL"><row></tt> and <tt class="LITERAL"><col></tt> elements, which specify the position of the widget in the grid. These elements themselves can have one or both of the attributes <tt class="LITERAL">rowspan</tt> and <tt class="LITERAL">colspan</tt>, which specify the number of rows and columns the cell should cover. The default is 1.</p>
<dt><tt class="LITERAL"><spacer></tt>
<dd>
<p>There can be any number of these elements, which describe a spacer in the layout (see the next section).</p>
<p>Besides the elements ordinarily defined as subelements of <tt class="LITERAL"><spacer></tt>, there can be <tt class="LITERAL"><row></tt> and <tt class="LITERAL"><col></tt> elements, which specify the position of the widget in the grid. These elements themselves can have one or both of the attributes <tt class="LITERAL">rowspan</tt> and <tt class="LITERAL">colspan</tt>, which specify the number of rows and columns the cell should cover. The default is 1.</p>
</dl>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="QT-DESIGNER-REF-UI-SPACERELEMENT"></a> The <tt class="LITERAL"><spacer></tt> Element</h2>
<p>This element describes a spacer item inside a layout. It has four properties:</p>
<dl>
<dt><tt class="LITERAL">name</tt>
<dd>
<p>This property, of the type <i class="EMPHASIS">string</i>, describes the name of the item.</p>
<dt><tt class="LITERAL">orientation</tt>
<dd>
<p>This property, of the type <i class="EMPHASIS">enum</i> with the valid values <tt class="LITERAL">Horizontal</tt> and <tt class="LITERAL">Vertical</tt>, describes the orientation of the item.</p>
<dt><tt class="LITERAL">sizeType</tt>
<dd>
<p>This property, of the type <i class="EMPHASIS">enum</i>, describes how the item expands in its direction. See the Qt Reference Documentation for size policies for more information.</p>
<dt><tt class="LITERAL">geometry</tt>
<dd>
<p>This property, of the type <i class="EMPHASIS">rect</i>, describes the geometry of the spacer, which is normally useful only for fixed spacing.</p>
</dl>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="QT-DESIGNER-REF-UI-ITEMELEMENT"></a> The <tt class="LITERAL"><item></tt> Element</h2>
<p>This element describes an item of a widget if this widget can contain items (like list boxes, icon views, etc.). The item element contains exactly one child element that describes the item. This child element is a <tt class="LITERAL"><property></tt> element. Valid property names are <tt class="LITERAL">text</tt> and <tt class="LITERAL">pixmap</tt>, depending on where to insert the item.</p>
<p>As list views can hold a tree of items, the <tt class="LITERAL"><item></tt> element can contain other <tt class="LITERAL"><item></tt> elements, which are then child items. Also, as list views can have many columns, an <tt class="LITERAL"><item></tt> element contains a <tt class="LITERAL">text</tt> and a <tt class="LITERAL">pixmap</tt> property for each column. The columns of a list view are described with a <tt class="LITERAL"><column></tt> element (see the next section).</p>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="QT-DESIGNER-REF-UI-COLUMNELEMENT"></a> The <tt class="LITERAL"><column></tt> Element</h2>
<p>This element describes the columns of a list view widget. A list view can contain multiple column elements. A column element contains the following properties, which are all optional:</p>
<dl>
<dt><tt class="LITERAL">text</tt>
<dd>
<p>This property, of type <i class="EMPHASIS">string</i>, contains the column label.</p>
<dt><tt class="LITERAL">pixmap</tt>
<dd>
<p>This property, of type <i class="EMPHASIS">pixmap</i>, contains the column pixmap.</p>
<dt><tt class="LITERAL">resizable</tt>
<dd>
<p>This property, of type <i class="EMPHASIS">bool</i>, describes whether the column may be resized by the user.</p>
<dt><tt class="LITERAL">movable</tt>
<dd>
<p>This property, of type <i class="EMPHASIS">bool</i>, describes whether the column may be moved by the user.<br>
<br>
</p>
</dl>
</div>
</div>
<div class="NAVFOOTER">
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="black">
<tr>
<td width="33%" align="left" valign="top"> <a href="chap9_1.html"><img height="20" width="20" src="arrows/left.png" border="0"></a> </td>
<td width="34%" align="center" valign="top"> <a href="book1.html"><img height="20" width="25" src="arrows/home.png" border="0"></a> </td>
<td width="33%" align="right" valign="top"> <a href="chap9_3.html"><img height="20" width="20" src="arrows/right.png" border="0"></a> </td>
</tr>
<tr>
<td width="33%" align="left" valign="top"><font color="white">The File Format Of .ui Files</font></td>
<td width="34%" align="center" valign="top"> <a href="chap9_1.html"><img height="20" width="20" src="arrows/up.png" border="0"></a> </td>
<td width="33%" align="right" valign="top"><font color="white">The Pixmaps In The <tt class="LITERAL"><images></tt> Element</font></td>
</tr>
</table>
</div>
</body>
</html>
|