Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 304

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /home/gvatteka/dev/qt-4.3/doc/src/designer-manual.qdoc -->
<head>
  <title>Editing Resources with Qt Designer</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1 align="center">Editing Resources with Qt Designer<br /><small></small></h1>
<p align="center"><img src="images/designer-resources-editing.png" /></p><p><i>Qt Designer</i> fully supports the <a href="resources.html">Qt Resource System</tt></a>, allowing resources to be specified alongside forms as they are designed. To help designers and developers manage the resources that are needed by applications, <i>Qt Designer</i>'s resource editor allows resources to be defined on a per-form basis.</p>
<a name="defining-a-resource-file"></a>
<h2>Defining a Resource File</h2>
<p>To specify a resource file you must enable the resorce editor by opening the <b>Tools</b> menu, and switching on the <b>Resource Editor</b> option.</p>
<a name="resourcefiles"></a><p><table align="center" cellpadding="2" cellspacing="1" border="0">
<tr valign="top" class="odd"><td><img src="images/designer-resource-editor.png" /></td><td><b>Resource Files</b><p>Using the resource editor, you can either open existing resource files or create new ones. Click the <b>Current Resource</b> combobox to choose one or the other.</p>
</td></tr>
</table></p>
<p>Once a resource file is loaded, you can create or remove entries in the file using the provided <b>+</b> and <b>-</b> buttons, and specify resources (for example images) using the <b>Add Files</b> button. Note that these resources must reside within the current resource file's directory or one of its subdirectories.</p>
<a name="editresource"></a><p><table align="center" cellpadding="2" cellspacing="1" border="0">
<tr valign="top" class="odd"><td><img src="images/designer-edit-resource.png" /></td><td><b>Editing Resource Files</b><p>Press the <b>+</b> button to add a new resource entry to the file. Then use the <b>Add Files</b> button to specify the resource.</p>
<p>You can remove resources by selecting the corresponding entry in the resource editor, and press the <b>-</b> button.</p>
</td></tr>
</table></p>
<a name="using-the-resources"></a>
<h2>Using the Resources</h2>
<p>When the resources are defined you can use them actively when composing your form. For example, you might want to create a tool button using an icon specified in the resource file.</p>
<a name="usingresources"></a><p><table align="center" cellpadding="2" cellspacing="1" border="0">
<tr valign="top" class="odd"><td><img src="images/designer-resources-using.png" /></td><td><b>Using Resources</b><p>When changing properties which values might be defined within a resource file, <i>Qt Designer</i> presents a dialog that allows you to specify a resource in addition to the option of selecting a source file in the ordinary way.</p>
<p>You can open the resource editor to add new resources any time in the design process.</p>
<p>To quickly assign icon pixmaps to actions or pixmap properties, you may drag the pixmap from the resource editor to the action editor, or to the pixmap property in the property editor.</p>
</td></tr>
</table></p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2007 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt Jambi </div></td>
</tr></table></div></address></body>
</html>