<p>This manual presents <em>TQt Designer</em>, a tool for designing and implementing user interfaces built with the TQt multiplatform GUI toolkit. <em>TQt Designer</em> makes it easy to experiment with user interface design. At any time you can generate the code required to reproduce the user interface from the files <em>TQt Designer</em> produces, changing your design as often as you like. If you used an earlier version you will find yourself immediately productive in the new version since the interface is very similar. And you will also find new widgets and new and improved functionality which have been developed as a result of your feedback.</p>
<p><em>TQt Designer</em> helps you build user interfaces with layout tools that move and scale your widgets (<em>controls</em> in Windows terminology) automatically at runtime. The resulting interfaces are both functional and attractive, comfortably suiting your users' operating environments and preferences. <em>TQt Designer</em> supports TQt's signals and slots mechanism for type-safe communication between widgets. <em>TQt Designer</em> includes a code editor which you can use to embed your own custom slots inside the generated code. Those who prefer to separate generated code from hand crafted code can continue to use the subclassing approach pioneered in the first version of <em>TQt Designer</em>.<!-- index Controls!Widgets --></p>
<p>The manual introduces you to <em>TQt Designer</em> by leading you through the development of example applications. The first seven chapters are tutorials, each designed to be as self-contained as possible. Every chapter, except the first three, assumes that you are familiar with the material in chapters two and three which cover the basics of building a TQt application with <em>TQt Designer</em>. Here's a brief overview of the chapters:</p>
<ul><li><p>Chapter one, <ahref="designer-manual-2.html">Quick Start</a>, is a fast hands-on tutorial that takes you through the creation of a short, simple dialog application. The aim of this chapter is to give you a feel for how <em>TQt Designer</em> works, with explanations and details deferred to later chapters.</p>
<li><p>Chapter two, <ahref="designer-manual-3.html">Creating a Main Window Application</a>, introduces <em>TQt Designer</em> and takes you step by step through the creation of a small but fully functional application. Along the way you will learn how to create a main window with menus, toolbars and a status bar. Most of the application's implementation will be covered, but the custom dialogs are deferred until chapter three. In the course of this chapter you will use the form and property editors to customize the application. You'll also learn how to use TQt's signals and slots mechanism and <em>TQt Designer</em>'s built-in code editor to make the application functional. We will also explain how to use <tt>qmake</tt> to generate a Makefile so that you can compile and run the application.</p>
<li><p>In chapter three, <ahref="designer-manual-4.html">Creating Dialogs</a>, we will create the custom dialogs required by the main window application created in chapter two. In addition to demonstrating various ways of creating dialogs, you will also learn how to lay out forms using the layout tools.</p>
<li><p>Chapter four, <ahref="designer-manual-5.html#the-designer-approach">The Designer Approach</a>, provides information on the <em>TQt Designer</em> approach to developing applications, and explains some of the rationale behind <em>TQt Designer</em>.</p>
<li><p>Chapter five, <ahref="designer-manual-6.html">Subclassing and Dynamic Dialogs</a>, will show you how to subclass a form; this allows you to clearly separate the user interface from the underlying code that implements its functionality. Additional information on <tt>qmake</tt> and <tt>uic</tt> is included in this chapter. This chapter will also explain how you can dynamically load dialogs from<!-- index .ui --><tt>.ui</tt> files into your application using <ahref="ntqwidgetfactory.html">TQWidgetFactory</a> and how to access the widgets and sub-widgets of these dialogs.</p>
<li><p>Chapter six, <ahref="designer-manual-7.html">Creating Custom Widgets</a>, explains how you can create your own custom widgets. Both the simple method, that was introduced with the first version of <em>TQt Designer</em>, and the new more powerful method using plugins, are explained.</p>
<li><p>Chapter seven, <ahref="designer-manual-8.html">Creating Database Applications</a> introduces TQt's SQL classes and takes you through an example that demonstrates how to execute SQL queries and how to set up master-detail relationships, perform drilldown and handle foreign keys.</p>
<li><p>Chapter eight, <ahref="designer-manual-9.html">Customizing and Integrating TQt Designer</a>, focuses on <em>TQt Designer</em> itself, showing you how to customize Designer, how to integrate Designer with Visual Studio and how to create Makefiles.</p>
</ul><p>The remaining chapters provide reference material that explains <em>TQt Designer</em>'s <ahref="designer-manual-11.html#reference-menu-options">menu options</a>, <ahref="designer-manual-12.html#reference-toolbar-buttons">toolbars</a>, <ahref="designer-manual-10.html#reference-key-bindings">key bindings</a>, <ahref="designer-manual-13.html#reference-dialogs">dialogs</a>, <ahref="designer-manual-14.html#reference-wizards">wizards</a>, and <ahref="designer-manual-15.html#reference-windows">windows</a> in detail.</p>
<h3><aname="2"></a>What You Should Know</h3>
<p>This manual assumes that you have some basic knowledge of C++ and the TQt GUI toolkit. If you need to learn more about C++ or TQt there are a vast number of C++ books available, and a small but increasing number of TQt books. TQt comes with extensive online documentation and many example applications that you can try.</p>
<p>The Enterprise Edition of TQt includes the TQt SQL module. In <ahref="designer-manual-8.html">Creating Database Applications</a> we demonstrate how to build SQL applications with <em>TQt Designer</em>; this chapter requires some knowledge of SQL and relational databases.</p>
<h3><aname="3"></a>What's New in <em>TQt Designer</em> for TQt 3.0?</h3>
<p>This version of <em>TQt Designer</em> has a great deal more functionality than its predecessor. For example, the code for custom slots can be edited directly in <em>TQt Designer</em>; main windows with actions, toolbars and menus can be created; layouts that incorporate splitters can be used; and plugins allow you to package any number of custom widgets and make them available to <em>TQt Designer</em>. Many other enhancements have been incorporated, from small improvements in the user interface to improved efficiency, for example the ability to share pixmaps across all the forms in an application.</p>
<p>This version of <em>TQt Designer</em> introduces project files which make it easy to switch between all the forms in an application, and to maintain a common set of database settings and images. Although subclassing is fully supported, writing code directly in <em>TQt Designer</em> offers a number of benefits which are covered in <ahref="designer-manual-5.html#the-designer-approach">The Designer Approach</a> chapter. A new library, <tt>libtqui</tt>, has also been introduced which allows you to load dialogs dynamically at runtime from <em>TQt Designer</em>'s <tt>.ui</tt> files. This allows you to provide your application's users with considerable interface customizability without them needing to use C++.</p>
<p>Although the new version of <em>TQt Designer</em> introduces new approaches and techniques you can ignore these aspects and simply use it in exactly the same way as you used the version supplied with TQt 2.x, if you just want a simple but powerful single dialog visual design tool.</p>
<h4><aname="3-1"></a>What's New in <em>TQt Designer</em> for TQt 3.1?</h4>
<ul><li><p><em>TQt Designer</em> now features a start-up dialog for fast access to recently used files, etc. (It can be switched off if you don't want it.)</p>
<li><p>The signals and slots dialog has changed significantly. It is far easier to use and much faster for creating lots of connections in one go. You can still click and drag to create connections, but the new dialog is much tquicker.</p>
<li><p>Widgets are now accessible using the Toolbox. (All the original toolbars are still available.) This provides the same easy access as toolbar buttons, and also shows the names of the widgets and takes up less space.</p>
<ul><li><p>The tool box widget used by <em>TQt Designer</em> since TQt 3.1 is now available as a TQt widget for use in your own programs. The widget is called <ahref="ntqtoolbox.html">TQToolBox</a>.</p>
<p>If you have any comments, suggestions, criticisms or even praise regarding this manual, please let us know at <tt>doc@trolltech.com</tt>. Bug reports on TQt or <em>TQt Designer</em> should be sent to <ahref="http://doc.trolltech.com/bughowto.html">qt-bugs@trolltech.com</a>. You might also like to join the <em>qt-interest</em> mailing list, which <em>TQt Designer</em>'s developers read and contribute to; see <ahref="http://lists.trolltech.com">http://lists.trolltech.com</a> for further details.</p>