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
|
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>The File Format Of .ui Files</title>
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.49">
<link rel="HOME" href="book1.html">
<link rel="UP" title="Qt Designer Reference Manual" href="part2index.html">
<link rel="PREVIOUS" title="The Key Bindings" href="chap8_1.html">
<link rel="NEXT" title="The <widget> Element" href="chap9_2.html">
</head>
<body class="CHAPTER" 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="chap8_1.html"><img height="20" width="20" src="arrows/left.png" border="0"></a></td>
<td width="80%" align="center" valign="bottom"><br>
</td>
<td width="10%" align="right" valign="bottom"><a href="chap9_2.html"><img height="20" width="20" src="arrows/right.png" border="0"></a></td>
</tr>
</table>
</div>
<div class="CHAPTER">
<h1><a name="AEN2621"></a>Chapter 9. The File Format Of .ui Files</h1>
<div class="TOC">
<dl>
<dt><b>Table of Contents</b>
<dt><a href="#AEN2656">Header Elements</a>
<dt><a href="chap9_2.html">The <tt class="LITERAL"><widget></tt> Element</a>
<dt><a href="chap9_3.html">The Pixmaps In The <tt class="LITERAL"><images></tt> Element</a>
<dt><a href="chap9_4.html">The Description Of The Used Custom Widgets</a>
<dt><a href="chap9_5.html">The Description Of The Defined Connections And Slots</a>
<dt><a href="chap9_6.html">The Description Of The Tab-Chain</a>
</dl>
</div>
<p>Qt Designer's <tt class="FILENAME">.ui</tt> files are a form of XML files. They follow a certain <i class="FIRSTTERM">Document Type Definition</i> (DTD), which is called <tt class="LITERAL">UI</tt>. This chapter is not a formal specification of the DTD but a verbal description of how these files are constructed and what syntax they follow. This information will enable you to quickly change things directly in the files without having to start Qt Designer or even mass-manipulate <tt class="FILENAME">.ui</tt> files with Perl scripts or other text manipulation tools. It is also conceivable to have a tool that extracts translatable strings from the <tt class="FILENAME">.ui</tt> files, even though Qt has other methods for this that apply at a later stage (namely, on the generated source files).</p>
<p>Each <tt class="FILENAME">.ui</tt> file consists of the following parts in this order:</p>
<ol type="1">
<li>
<p>The literal string <tt class="LITERAL"><!DOCTYPE UI><UI></tt></p>
<li>
<p>Header elements</p>
<li>
<p>Exactly one <tt class="LITERAL"><widget></tt> element that describes the top-level widget of the form</p>
<li>
<p>Optionally, a collection of pixmaps in an <tt class="LITERAL"><images></tt> element</p>
<li>
<p>Optionally, a section that describes the used custom widgets</p>
<li>
<p>Optionally, a section on the defined connections and slots</p>
<li>
<p>Optionally, a section on the tab-chain</p>
<li>
<p>The literal string <tt class="LITERAL"></UI></tt></p>
</ol>
<p>We'll now cover all these parts one by one.</p>
<div class="SECT1">
<h1 class="SECT1"><a name="AEN2656"></a>Header Elements</h1>
<p>The header elements describe general information about the form. All of them are optional.</p>
<dl>
<dt><tt class="LITERAL"><class></tt>
<dd>
<p>If this element is specified, its content is used as the name of the class that <b class="COMMAND">uic</b> generates. Otherwise, the name of the top-level widget is used.</p>
<dt><tt class="LITERAL"><comment></tt>
<dd>
<p>If you have entered a comment in the Form Settings dialog, this is where it will appear. It will not appear in the generated source code, however.</p>
<dt><tt class="LITERAL"><author></tt>
<dd>
<p>This element contains information about the author of the form. This information will not appear in the generated source code, however.</p>
<dt><tt class="LITERAL"><include></tt>
<dd>
<p>If you have specified additional include files in the Form Settings dialog, this is where they will appear.</p>
<dt><tt class="LITERAL"><pixmapfunction></tt>
<dd>
<p>If you have specified a function for loading pixmaps, this element names it. This also means that the images are not listed in the <tt class="LITERAL"><images></tt> element described later in this chapter.</p>
</dl>
</div>
</div>
<div class="NAVFOOTER">
<p><br>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="black">
<tr>
<td width="33%" align="left" valign="top"><a href="chap8_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_2.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 Key Bindings</font></td>
<td width="34%" align="center" valign="top"><a href="part2index.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 <tt class="LITERAL"><widget></tt> Element</font></td>
</tr>
</table>
</div>
</body>
</html>
|