<p><em>TQt Assistant</em> can be customized by adding and removing documentation from its documentation set. In addition, <em>TQt Assistant</em> introduces the profiles option, which enables its properties to change, for example, the default startup page, and application icon.</p>
<h3><aname="1"></a>Modifying the Default Documentation Set</h3>
<p>When it is started without any options, <em>TQt Assistant</em> displays a default set of documentation. When TQt is installed, the default documentation set in <em>TQt Assistant</em> contains the TQt reference documentation as well as the tools that come with TQt, such as <em>TQt Designer</em> and qmake.</p>
<p>When it is started without any options, <em>TQt Assistant</em> displays a default set of documentation. When TQt is installed, the default documentation set in <em>TQt Assistant</em> contains the TQt reference documentation as well as the tools that come with TQt, such as <em>TQt Designer</em> and tqmake.</p>
<p>Documentation can be added or removed from <em>TQt Assistant</em> by adding and removing the content files. The format of the content files are specified below. To add a content file, type the following command line option: <tt>-addContentFile docfile</tt>. To remove a content file from the default set, type the following command line option: <tt>-removeContentFile docfile</tt>. For example:</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>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>tqmake</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>tquic</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="tqwidgetfactory.html">TQWidgetFactory</a> and how to access the widgets and sub-widgets of these dialogs.</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>tqmake</tt> and <tt>tquic</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="tqwidgetfactory.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>
<blockquote><palign="center"><em>Project Settings- C++ Tab</em></p></blockquote>
<p>Click the C++ Tab to change the <tt>qmake</tt> options. See the <ahref="qmake-manual.html">qmake documentation</a> for details on what these options mean. Click the 'Template' combobox and choose application or library to create makefiles for building applications or libraries. Click the 'Config' combobox to select the project configuration and compiler options for all platforms, or specific platforms. Type the Config value in the line edit. Note: Unix defaults to a shared library. If you want a shared library in Windows, type 'dll' at the end of the default config command and make sure you select lib from the Template combobox. Click the 'Libs' combobox to select a platform. Type the libraries in the line edit. Click the 'Defines' combobox and select a platform. 'Defines' values are added as compiler pre-processor macros. Type the 'Defines' values in the line edit. Click the 'Includepath' combobox to select a platform. Includepath specifies the directories that should be searched for include files when compiling the project. Type the 'Includepath' values in the line edit.</p>
<p>Click the C++ Tab to change the <tt>tqmake</tt> options. See the <ahref="tqmake-manual.html">tqmake documentation</a> for details on what these options mean. Click the 'Template' combobox and choose application or library to create makefiles for building applications or libraries. Click the 'Config' combobox to select the project configuration and compiler options for all platforms, or specific platforms. Type the Config value in the line edit. Note: Unix defaults to a shared library. If you want a shared library in Windows, type 'dll' at the end of the default config command and make sure you select lib from the Template combobox. Click the 'Libs' combobox to select a platform. Type the libraries in the line edit. Click the 'Defines' combobox and select a platform. 'Defines' values are added as compiler pre-processor macros. Type the 'Defines' values in the line edit. Click the 'Includepath' combobox to select a platform. Includepath specifies the directories that should be searched for include files when compiling the project. Type the 'Includepath' values in the line edit.</p>
<p>Cick <b>OK</b> to accept changes to the project settings. Click <b>Cancel</b> to exit the dialog without making any changes to the project settings.</p>
<h3><aname="6"></a>The Search Dialogs</h3>
<aname="dialog-find-text"></a><h4><aname="6-1"></a>Find Text Dialog</h4>
<!-- index Projects --><!-- index Projects!Creating New --><!-- index Creating Projects!Projects --><!-- index Pixmaps!In Projects --><!-- index Pixmaps!Adding to Forms --><p>Whenever you create a new application we recommend that you create a project file and open the project rather than individual<!-- index .ui --><tt>.ui</tt> files. Using a project has the advantage that all the forms you create for the project are available via a single mouse click rather than having to be loaded individually through file open dialogs. An additional benefit of using project files is that they allow you to store all your images in a single file rather than duplicate them in each form in which they appear. See <ahref="designer-manual-5.html#the-designer-approach">The Designer Approach</a> chapter's <ahref="designer-manual-5.html#2">Project management</a> section for detailed information on the benefits of using project files.</p>
<p>Project files use the <tt>.pro</tt> suffix and are used by the <tt>qmake</tt> tool to create makefiles for the relevant target platforms.</p>
<p>Project files use the <tt>.pro</tt> suffix and are used by the <tt>tqmake</tt> tool to create makefiles for the relevant target platforms.</p>
</blockquote>
<p>Create a new project as follows:</p>
<oltype=1><li><p>Click <b>File|New</b> to invoke the <em>New File</em> dialog.</p>
<p>This ensures that our application will cleanly terminate. Later we'll revise this function to give the user the opportunity to save any unsaved data.</p>
<h4><aname="6-13"></a>Building and Running</h4>
<p>We now have some code in the application and a <tt>main.cpp</tt> containing the <tt>main()</tt> function, so we should be able to compile, link and run the application.</p>
<p>Click <b>File|Save</b> to ensure that all our work is saved to disk. Open a console (e.g. an xterm or DOS window), change directory to where you have saved the <tt>colortool</tt> project, and run <tt>qmake</tt> to generate a Makefile:</p>
<p>Click <b>File|Save</b> to ensure that all our work is saved to disk. Open a console (e.g. an xterm or DOS window), change directory to where you have saved the <tt>colortool</tt> project, and run <tt>tqmake</tt> to generate a Makefile:</p>
<pre>
qmake -o Makefile colortool.pro
tqmake -o Makefile colortool.pro
</pre>
<p>Now make the project (run <tt>nmake</tt> on Windows, <tt>make</tt> on other platforms). Providing you commented out the "findForm" and "loadSettings" lines in the <tt>init()</tt> function, the program should build. (If it doesn't build see the <ahref="designer-manual-4.html#6">Troubleshooting</a> section.)</p>
<p>Once the make has finished, run the program. You still can't change views since we haven't written the code for that yet, but it does create a default set of colors. You can terminate the application by clicking the close (X) button or by clicking <b>File|Exit</b>.</p>
<p>When you've opened or created a project you can set up its database connections using the <em>Edit Database Connections</em> dialog (invoked by the <b>Project|Database Connections</b> menu option). The connections you make are stored in a <tt>.db</tt> file. When you reload a project you can reconnect by going to the <em>Edit Database Connections</em> dialog, clicking a connection in the list and clicking the <b>Connect</b> button.</p>
<p>In most non-trivial database applications you will want to access the database from more than one form. This is why the <tt>.db</tt> file is part of a project, not just part of a single form.</p>
<h4><aname="2-4"></a>.pro files</h4>
<p><em>TQt Designer</em> needs to store information on projects, for example, the list of forms, the image collection and information about available databases and how to access them. The majority of TQt users already use a project file format to create multiplatform makefiles: <tt>tmake</tt> (and with TQt 3.0 <tt>qmake</tt>) project <tt>.pro</tt> files. These files already contain the list of forms, <tt>.ui</tt> files, used in the project for <tt>tquic</tt>.</p>
<p>We've extended the sections in the <tt>.pro</tt> file to include the extra information that <em>TQt Designer</em> needs to manage projects. For example, when you add a form to your project in <em>TQt Designer</em>, it is automatically added to the FORMS section of the project file, and thus <tt>qmake</tt> will generate the required build rules without any further work. Similarly, the images are added to the IMAGES section and thus gets automatically compiled into your executable.</p>
<p>We don't force you to use <tt>qmake</tt>; if you prefer another build system, for example automake/autoconf or jam, you can still continue to use it. Look upon the <tt>.pro</tt> file as a file that describes the GUI part of your application. All you need to do -- as previously -- is add the <tt>.ui</tt> files and the images collection to your own Makefiles.</p>
<p><em>TQt Designer</em> needs to store information on projects, for example, the list of forms, the image collection and information about available databases and how to access them. The majority of TQt users already use a project file format to create multiplatform makefiles: <tt>tmake</tt> (and with TQt 3.0 <tt>tqmake</tt>) project <tt>.pro</tt> files. These files already contain the list of forms, <tt>.ui</tt> files, used in the project for <tt>tquic</tt>.</p>
<p>We've extended the sections in the <tt>.pro</tt> file to include the extra information that <em>TQt Designer</em> needs to manage projects. For example, when you add a form to your project in <em>TQt Designer</em>, it is automatically added to the FORMS section of the project file, and thus <tt>tqmake</tt> will generate the required build rules without any further work. Similarly, the images are added to the IMAGES section and thus gets automatically compiled into your executable.</p>
<p>We don't force you to use <tt>tqmake</tt>; if you prefer another build system, for example automake/autoconf or jam, you can still continue to use it. Look upon the <tt>.pro</tt> file as a file that describes the GUI part of your application. All you need to do -- as previously -- is add the <tt>.ui</tt> files and the images collection to your own Makefiles.</p>
<h3><aname="3"></a>Extending the functionality of a form</h3>
<p>First let us look at a small figure that shows the relationship between <tt>.ui</tt> files, generated code and application code:</p>
<p>We'll start with a general description of how to subclass a form and follow with a short example. Note that subclassing has some disadvantages compared with putting your code into a form directly; see <ahref="designer-manual-5.html#3">Extending the functionality of a form</a> in <ahref="designer-manual-5.html#the-designer-approach">The Designer Approach</a> chapter for details.</p>
<h4><aname="1-1"></a>Generating Source Code from <em>TQt Designer</em> .ui Files</h4>
<p><em>TQt Designer</em> reads and writes <tt>qmake</tt><!-- index .pro --><tt>.pro</tt> (project) files which are used to record the files used to build the application and from which Makefiles are generated. <em>TQt Designer</em> also reads and writes<!-- index .ui --><tt>.ui</tt> (user interface) files. These are XML files that record the widgets, layouts, source code and settings you've used for a form. Every<!-- index .ui --><tt>.ui</tt> file is converted by the <tt>tquic</tt> (user interface compiler) into a C++<!-- index .h --><tt>.h</tt> file and a C++<!-- index .cpp --><tt>.cpp</tt> file. These C++ files are then read by <tt>tqmoc</tt> (meta object compiler), and finally compiled by your compiler into a working application.</p>
<p><em>TQt Designer</em> reads and writes <tt>tqmake</tt><!-- index .pro --><tt>.pro</tt> (project) files which are used to record the files used to build the application and from which Makefiles are generated. <em>TQt Designer</em> also reads and writes<!-- index .ui --><tt>.ui</tt> (user interface) files. These are XML files that record the widgets, layouts, source code and settings you've used for a form. Every<!-- index .ui --><tt>.ui</tt> file is converted by the <tt>tquic</tt> (user interface compiler) into a C++<!-- index .h --><tt>.h</tt> file and a C++<!-- index .cpp --><tt>.cpp</tt> file. These C++ files are then read by <tt>tqmoc</tt> (meta object compiler), and finally compiled by your compiler into a working application.</p>
<!-- index Makefiles --><!-- index Projects!Adding Files --><!-- index Adding!Files to Projects --><p>If you create applications wholly within <em>TQt Designer</em> you only need to create a<!-- index main.cpp --><tt>main.cpp</tt>.</p>
<p>If you create the <tt>main.cpp</tt> file within <em>TQt Designer</em>, it will automatically be added to your project file by <em>TQt Designer</em>. If you create the <tt>main.cpp</tt> file outside of <em>TQt Designer</em> you must add it to the project file manually by adding the following line at the end of your project's<!-- index .pro --><tt>.pro</tt> file:</p>
<pre>
SOURCES += main.cpp
</pre>
<p>You can then use <tt>qmake</tt> to generate the Makefile. (For example <tt>qmake -o Makefile myproject.pro</tt>.) Running <tt>make</tt> (Linux or Unix compilers), or <tt>nmake</tt> (Visual C++), will then call <tt>tquic</tt>, <tt>tqmoc</tt> and your compiler as necessary to build your application.</p>
<!-- index Errors!Undefined reference --><!-- index Undefined references, Error --><!-- index qmake!HEADERS --><!-- index qmake!SOURCES --><p>If you use <em>TQt Designer</em> to create your main window and dialogs, but also add other C++ files, or if you subclass any of your forms you will need to add these files to the<!-- index .pro --><tt>.pro</tt> file so that they are compiled with the rest of your application's source files. Each<!-- index .h --><tt>.h</tt> file that you create separately from <em>TQt Designer</em> should be added to the <tt>HEADERS</tt> line, and each<!-- index .cpp --><tt>.cpp</tt> file should be added to the <tt>SOURCES</tt> line, just as we've done for<!-- index main.cpp --><tt>main.cpp</tt>. If you get undefined reference errors it is worth checking that you've added the names of all your header and implementation files to the<!-- index .pro --><tt>.pro</tt> file.</p>
<p>You can then use <tt>tqmake</tt> to generate the Makefile. (For example <tt>tqmake -o Makefile myproject.pro</tt>.) Running <tt>make</tt> (Linux or Unix compilers), or <tt>nmake</tt> (Visual C++), will then call <tt>tquic</tt>, <tt>tqmoc</tt> and your compiler as necessary to build your application.</p>
<!-- index Errors!Undefined reference --><!-- index Undefined references, Error --><!-- index tqmake!HEADERS --><!-- index tqmake!SOURCES --><p>If you use <em>TQt Designer</em> to create your main window and dialogs, but also add other C++ files, or if you subclass any of your forms you will need to add these files to the<!-- index .pro --><tt>.pro</tt> file so that they are compiled with the rest of your application's source files. Each<!-- index .h --><tt>.h</tt> file that you create separately from <em>TQt Designer</em> should be added to the <tt>HEADERS</tt> line, and each<!-- index .cpp --><tt>.cpp</tt> file should be added to the <tt>SOURCES</tt> line, just as we've done for<!-- index main.cpp --><tt>main.cpp</tt>. If you get undefined reference errors it is worth checking that you've added the names of all your header and implementation files to the<!-- index .pro --><tt>.pro</tt> file.</p>
<h4><aname="1-2"></a>Subclassing a Form</h4>
<!-- index Subclassing --><p>When subclassing a form it is helpful to use a naming convention to help us identify which files are generated from <em>TQt Designer</em>'s<!-- index .ui --><tt>.ui</tt> files and which are hand coded.</p>
<p>Suppose, for example, that we are developing a dialog and writing the code directly in <em>TQt Designer</em>. We might call our dialog 'OptionsForm' and the<!-- index .ui --><tt>.ui</tt> file, <tt>optionsform.ui</tt>. The automatically generated files will be <tt>optionsform.h</tt> and <tt>optionsform.cpp</tt>.</p>
@ -94,7 +94,7 @@ int main( int argc, char *argv[] )
}
</pre>
<p>Note that we're including <tt>creditformbase.h</tt> and instantiating a CreditFormBase object; once we've written our subclass we'll replace the header with our subclass, <tt>creditform.h</tt>, and instantiate a CreditForm.</p>
<p>We can now generate the application with <tt>qmake</tt>, e.g. <tt>qmake -o Makefile credit.pro</tt>, make it and run it. The form should run fine, but doesn't yet have the behaviour we require.</p>
<p>We can now generate the application with <tt>tqmake</tt>, e.g. <tt>tqmake -o Makefile credit.pro</tt>, make it and run it. The form should run fine, but doesn't yet have the behaviour we require.</p>
<h5><aname="1-3-3"></a>Creating the Subclass</h5>
<p>We need to create a header and an implementation file for our subclass. The code for our subclass is minimal. The header file is <tt>qt/tools/designer/examples/credit/creditform.h</tt>:</p>
<pre> #include "creditformbase.h"
@ -134,7 +134,7 @@ int main( int argc, char *argv[] )
}
</pre>
<p>We call <tt>setAmount()</tt> in the constructor to ensure that the correct amount is shown when the form starts based on whichever radio button we checked in <em>TQt Designer</em>. In <tt>setAmount()</tt> we set the amount if the standard or none radio button is checked. If the user has checked the special radio button they are free to change the amount themselves.</p>
<!-- index Makefiles --><!-- index qmake!HEADERS --><!-- index qmake!SOURCES --><p>To be able to test our subclass we change<!-- index main.cpp --><tt>main.cpp</tt> to include <tt>creditform.h</tt> rather than <tt>creditformbase.h</tt> and change the instantiation of the creditForm object:</p>
<!-- index Makefiles --><!-- index tqmake!HEADERS --><!-- index tqmake!SOURCES --><p>To be able to test our subclass we change<!-- index main.cpp --><tt>main.cpp</tt> to include <tt>creditform.h</tt> rather than <tt>creditformbase.h</tt> and change the instantiation of the creditForm object:</p>
@ -154,7 +154,7 @@ int main( int argc, char *argv[] )
HEADERS += creditform.h
SOURCES += creditform.cpp
</pre>
<p>To test the form rerun <tt>qmake</tt> to regenerate the Makefile, then make and run.</p>
<p>To test the form rerun <tt>tqmake</tt> to regenerate the Makefile, then make and run.</p>
<p>The subclassing example we've used is simple, but this reflects subclassing forms in TQt: it is easy to do.</p>
<aname="dynamicdialogs"></a><h3><aname="2"></a>Creating Dynamic Dialogs from .ui Files</h3>
<!-- index Dynamic Dialogs --><!-- index Dialogs!Dynamic --><!-- index Code Editing!Not in Dynamic Dialogs --><p>TQt programs are capable of loading <em>TQt Designer</em><!-- index .ui --><tt>.ui</tt> files and instantiating the forms represented by the<!-- index .ui --><tt>.ui</tt> files. Since the<!-- index .ui --><tt>.ui</tt> file is not compiled it cannot include any C++ code, (e.g. slot implementations). In this section we will explain how to load a dynamic dialog and how to create a class that can be used to implement the dynamic dialog's custom slots.</p>
<p>We can create the makefile using <tt>qmake</tt>: <tt>qmake -o Makefile filechooser.pro</tt>, then we can make and run the harness to test our new widget. Once we're satisfied that the custom widget is robust and has the behaviour we require we can embed it into a plugin.</p>
<p>We can create the makefile using <tt>tqmake</tt>: <tt>tqmake -o Makefile filechooser.pro</tt>, then we can make and run the harness to test our new widget. Once we're satisfied that the custom widget is robust and has the behaviour we require we can embed it into a plugin.</p>
<h4><aname="2-2"></a>Creating a Plugin</h4>
<!-- index Creating Plugins --><!-- index Plugins!Creating a Plugin --><!-- index Component!Plugins --><p>TQt Plugins can be used to provide self-contained software components for TQt applications. TQt currently supports the creation of five kinds of plugins: codecs, image formats, database drivers, styles and custom widgets. In this section we will explain how to convert our filechooser custom widget into a <em>TQt Designer</em> custom widget plugin.</p>
<p>A <em>TQt Designer</em> custom widget plugin is always derived from <ahref="tqwidgetplugin.html">TQWidgetPlugin</a>. The amout of code that needs to be written is minimal.</p>
<p>Change the <tt>HEADERS</tt> line to list your plugin's header file plus a header file for each of your widgets. Make the equivalent change for the <tt>SOURCES</tt> line. If you create a Makefile with <tt>qmake</tt> and make the project the plugin will be created and placed in a directory where <em>TQt Designer</em> can find it. The next time you run <em>TQt Designer</em> it will detect your new plugin and load it automatically, displaying its icon in the toolbar you specified.</p>
<p>Change the <tt>HEADERS</tt> line to list your plugin's header file plus a header file for each of your widgets. Make the equivalent change for the <tt>SOURCES</tt> line. If you create a Makefile with <tt>tqmake</tt> and make the project the plugin will be created and placed in a directory where <em>TQt Designer</em> can find it. The next time you run <em>TQt Designer</em> it will detect your new plugin and load it automatically, displaying its icon in the toolbar you specified.</p>
<h5><aname="2-2-4"></a>Using the Widget Plugin</h5>
<p>Once the plugin has been compiled it will automatically be found and loaded by <em>TQt Designer</em> the next time <em>TQt Designer</em> is run. Use your custom widget just like any other.</p>
<p>If you want to use the plugin in another of your projects you can link against it by adding an appropriate line to the project, e.g. by adding a line like this to the project's <tt>.pro</tt> file:</p>
<p>Choose <b>Project|Database Connections</b> from the menu bar. The <em>Edit Database Connections</em> dialog will appear. Click <b>New Connection</b>. For applications that use a single database it will probably be most convenient to use the default connection name of '(default)'. If you use more than one database then each one must be given a unique name. A driver must be chosen from the Driver combo box. The database name may be available in the Database Name combo box or may have to be typed in. The database name, username, password, hostname and port should be provided by your database system administrator. When the Connection information has been completed click <b>Connect</b>. If the connection is made the connection name will appear in the list box on the left hand side of the dialog. You can now close the dialog; the connection settings will remain in effect until you change or delete them or exit from <em>TQt Designer</em>.</p>
<p><b>Warning:</b> If you are using an existing SQLite database, ensure that the name you specify in the "Database Name" field is not the same as the existing database file. <em>TQt Designer</em> will create a configuration file using the name given for the database and will overwrite any existing files with the same name.</p>
<!-- index Projects!Database Connections --><p><em>TQt Designer</em> can remember database connection settings in <tt>qmake</tt> project files. Create a new project, e.g. click <b>File|New</b>, then click the 'C++ Project' icon to invoke the <em>Project Settings</em> dialog. Click the ellipsis button to invoke the <em>Save As</em> dialog; navigate to the project's directory (creating it if necessary). Make sure you're in the project's directory, then enter a project name of 'book.pro'. Click the <b>Save</b> button to return to the <em>Project Settings</em> dialog, then click <b>OK</b>. Next time you start <em>TQt Designer</em> instead of opening individual <tt>.ui</tt> files open the <tt>.pro</tt> project file instead and <em>TQt Designer</em> will automatically reload the project's connection settings. To activate the connection click <b>Project|Database Connections</b>. The connections previously saved with the project will be listed in the left hand list box. Click the connection you wish to use and then click <b>Connect</b>. This connection will be used from now on, e.g. for previewing <ahref="tqdatatable.html">TQDataTable</a>s. Opening a project file also causes <em>TQt Designer</em> to load in the list of forms associated with the project into the Project Overview window. In most of the explanation that follows we will assume that you use project files and have clicked <b>Connect</b> so that there is always a connection available when you work in <em>TQt Designer</em>.</p>
<!-- index Projects!Database Connections --><p><em>TQt Designer</em> can remember database connection settings in <tt>tqmake</tt> project files. Create a new project, e.g. click <b>File|New</b>, then click the 'C++ Project' icon to invoke the <em>Project Settings</em> dialog. Click the ellipsis button to invoke the <em>Save As</em> dialog; navigate to the project's directory (creating it if necessary). Make sure you're in the project's directory, then enter a project name of 'book.pro'. Click the <b>Save</b> button to return to the <em>Project Settings</em> dialog, then click <b>OK</b>. Next time you start <em>TQt Designer</em> instead of opening individual <tt>.ui</tt> files open the <tt>.pro</tt> project file instead and <em>TQt Designer</em> will automatically reload the project's connection settings. To activate the connection click <b>Project|Database Connections</b>. The connections previously saved with the project will be listed in the left hand list box. Click the connection you wish to use and then click <b>Connect</b>. This connection will be used from now on, e.g. for previewing <ahref="tqdatatable.html">TQDataTable</a>s. Opening a project file also causes <em>TQt Designer</em> to load in the list of forms associated with the project into the Project Overview window. In most of the explanation that follows we will assume that you use project files and have clicked <b>Connect</b> so that there is always a connection available when you work in <em>TQt Designer</em>.</p>
<h4><aname="1-2"></a>Setting Up Connections for Applications</h4>
<p>The applications you create must make their own connections to the SQL database. We provide an example function, <tt>createConnections()</tt>, that you can use as a basis for your own code.<!-- index createConnections() --></p>
<pre>
@ -136,7 +136,7 @@ bool createConnections()
<oltype=1><li><p>Click on the form and change its name to 'BookForm' and its caption to 'Book'. Click on the <ahref="tqdatatable.html">TQDataTable</a> and change its name to 'AuthorDataTable'.</p>
<li><p>Click <b>File|Save All</b>.</p>
<li><p>Open the project file, e.g.<!-- index book.pro --><tt>book.pro</tt>, in a plain text editor and add the line: <tt>SOURCES += main.cpp</tt> at the end of the file.</p>
<li><p>Run <tt>qmake</tt> to generate the make file, e.g. <tt>qmake -o Makefile book.pro</tt>, then make and run the <tt>book</tt> program.</p>
<li><p>Run <tt>tqmake</tt> to generate the make file, e.g. <tt>tqmake -o Makefile book.pro</tt>, then make and run the <tt>book</tt> program.</p>
</ol><p>This example shows how easy it is to use <ahref="tqdatatable.html">TQDataTable</a> to show the contents of a database table or view. You can use the application we've just built to update and delete author records. In the examples that follow we will cover insertions, setting up master-detail relationships, drilldown and foreign key lookups.</p>
<blockquote>
<palign="center"><b> A Note on Foreign Keys</b></p>
<ul><li><p>New TQt Project -- A small application wizard</p>
<li><p>New TQt Dialog -- Add an empty TQt Dialog to the active project, or add an existing dialog</p>
<li><p>TQt GUI Designer -- Run <em>TQt Designer</em></p>
<li><p>Open TQt Project -- Runs <tt>qmake</tt> with a<!-- index .pro --><tt>.pro</tt> file</p>
<li><p>Open TQt Project -- Runs <tt>tqmake</tt> with a<!-- index .pro --><tt>.pro</tt> file</p>
<li><p>Write TQt Project -- Saves the current VS project as a<!-- index .pro --><tt>.pro</tt> file</p>
<li><p>Use TQt -- Add the TQt libraries to the active project</p>
<li><p>Add TQMoc -- Add <tt>tqmoc</tt> precompiler to the active file</p>
</ul><p>Double clicking a<!-- index .ui --><tt>.ui</tt> file in the workspace overview will now launch <em>TQt Designer</em>.</p>
<!-- index Macros!TQ_OBJECT --><!-- index TQ_OBJECT --><p>If you create a<!-- index .cpp --><tt>.cpp</tt> file which contains the <tt>TQ_OBJECT</tt> macro you will need an additional file which is generated by <tt>tqmoc</tt> to be included in your project. For example, if you have 'file.cpp', then the last line would be <tt>#include "file.moc"</tt> and the additional file would be called 'file.moc'. To ensure that Visual Studio executes the <tt>tqmoc</tt> and generates this file you must create a custom dependency. Double click the<!-- index .cpp --><tt>.cpp</tt> file (in your project workspace) that contains the <tt>TQ_OBJECT</tt> macro. Click the <b>Add TQMoc</b> toolbar button; this will create an empty<!-- index .moc --><tt>.moc</tt> file in your project workspace. Right click the newly created<!-- index .moc --><tt>.moc</tt> file, then click <b>Settings</b> from the pop-up menu to invoke the Project Settings dialog. Click the Custom Build tab. Click the <b>Dependencies</b> button to pop up the User Defined Dependencies dialog. Type in <tt>$(InputDir)\$(InputPath)</tt>, then press <b>Return</b>. Click <b>OK</b> to leave the Dependencies dialog, then click <b>OK</b> to leave the Project Settings dialog.</p>
<p>If you wish to delete the add-in remove it from the toolbar then delete the<!-- index qmsdev.dll --><tt>qmsdev.dll</tt> file from the add-ins directory.</p>
<h4><aname="3-1"></a>Creating Makefiles without qmake</h4>
<!-- index Makefiles --><p>The <tt>qmake</tt> tool provided with TQt can create Makefiles appropriate to your platform based on<!-- index .pro --><tt>.pro</tt> project files. This section describes the dependencies involved in building a TQt application and gives a couple of simple example Makefiles. This section assumes that you have a good understanding of Makefiles.</p>
<h4><aname="3-1"></a>Creating Makefiles without tqmake</h4>
<!-- index Makefiles --><p>The <tt>tqmake</tt> tool provided with TQt can create Makefiles appropriate to your platform based on<!-- index .pro --><tt>.pro</tt> project files. This section describes the dependencies involved in building a TQt application and gives a couple of simple example Makefiles. This section assumes that you have a good understanding of Makefiles.</p>
<!-- index Macros!TQ_OBJECT --><!-- index TQ_OBJECT --><p><em>TQt Designer</em> produces<!-- index .ui --><tt>.ui</tt> files which are used to generate<!-- index .h --><tt>.h</tt> and<!-- index .cpp --><tt>.cpp</tt> files for the compiler to compile. The<!-- index .ui --><tt>.ui</tt> files are processed by <tt>tquic</tt>. Classes which inherit from <ahref="tqobject.html">TQObject</a>, e.g. those which use slots and signals, require an additional<!-- index .cpp --><tt>.cpp</tt> file to be generated. These files are generated by <tt>tqmoc</tt> and are named '<em>tqmoc_</em>file.cpp' where the original<!-- index .cpp --><tt>.cpp</tt> file is called 'file.cpp'. If your<!-- index .cpp --><tt>.cpp</tt> file contains the <tt>TQ_OBJECT</tt> macro an additional file 'file.moc' should be generated which must be <tt>#include</tt>d in the<!-- index .cpp --><tt>.cpp</tt>, normally at the end. This requires an extra dependency being created.</p>
<p>Processing<!-- index .ui --><tt>.ui</tt> files with <tt>tquic</tt> is done <em>twice</em>:</p>
<pre>
@ -169,7 +169,7 @@ myform.cpp: myform.h myform.ui
myform.h: myform.ui
tquic myform.ui -o myform.h
</pre>
<p>To see more sophisticated Makefiles simply generate them using <tt>qmake</tt> on any of your TQt projects or any of the examples supplied with TQt.</p>
<p>To see more sophisticated Makefiles simply generate them using <tt>tqmake</tt> on any of your TQt projects or any of the examples supplied with TQt.</p>
<!-- index Foreign File Formats --><p>To import a file in a supported foreign file format click <b>File|Open</b>, then click the File Type combobox to choose the file type you wish to load. Click the required file and <em>TQt Designer</em> will convert and load the file.</p>
<p>The filters that <em>TQt Designer</em> uses to read foreign file formats are 'works in progress'. You may have different filters available in your version of <em>TQt Designer</em> than those described here. The easiest way to see which filters are available is to invoke the file open dialog; all your filters are listed in the File Type combobox.</p>
@ -341,8 +341,8 @@ an example project file (<tt>.pro</tt> file):
<p> When you run <em>lupdate</em> or <em>lrelease</em>, you must give the name of the
project file as a command-line argument.
<p> In this example, four exotic languages are supported: Danish, Finnish,
Norwegian and Swedish. If you use <ahref="qmake-manual.html">qmake</a>, you usually don't need an extra project
file for <em>lupdate</em>; your <tt>qmake</tt> project file will work fine once
Norwegian and Swedish. If you use <ahref="tqmake-manual.html">tqmake</a>, you usually don't need an extra project
file for <em>lupdate</em>; your <tt>tqmake</tt> project file will work fine once
you add the <tt>TRANSLATIONS</tt> entry.
<p> In your application, you must <ahref="tqtranslator.html#load">TQTranslator::load</a>() the translation
files appropriate for the user's language, and install them using <ahref="tqapplication.html#installTranslator">TQApplication::installTranslator</a>().
@ -128,20 +128,20 @@ existing projects. It can also be started up by using the Ctrl+Shift+D key
combination in Visual Studio.
<p><h3> Using the 'Open TQt Project' button
</h3>
<aname="3-4"></a><p> The 'Open TQt Project' button allows you to convert an existing <tt>qmake</tt> project file into a <tt>.dsp</tt> file which you can insert into
<aname="3-4"></a><p> The 'Open TQt Project' button allows you to convert an existing <tt>tqmake</tt> project file into a <tt>.dsp</tt> file which you can insert into
your existing workspace. When you click the 'Open TQt Project'
button, just select an existing <tt>qmake</tt> project file (a <tt>.pro</tt>
button, just select an existing <tt>tqmake</tt> project file (a <tt>.pro</tt>
file) and then click OK. You will get a message box at the end
which asks you to insert the newly created <tt>.dsp</tt> file into your
existing workspace.
<p><h3> Using the 'Write TQt Project' button
</h3>
<aname="3-5"></a><p> The 'Write TQt Project' button creates a <tt>qmake</tt> project (<tt>.pro</tt>)
<aname="3-5"></a><p> The 'Write TQt Project' button creates a <tt>tqmake</tt> project (<tt>.pro</tt>)
file for your current project so that you can easily copy the files
onto another platform and be able to use <tt>qmake</tt> to create a Makefile
onto another platform and be able to use <tt>tqmake</tt> to create a Makefile
on that other platform. All you need to do is make the project you
want to create a <tt>.pro</tt> file for, and click on the button. Just
name your <tt>qmake</tt> project file and click Save.
name your <tt>tqmake</tt> project file and click Save.
<p><h3> Using the 'Use TQt In Current Project' button
</h3>
<aname="3-6"></a><p> The 'Use TQt In Current Project' button simply adds in the necessary
<!-- index Release Manager --><p>Two tools are provided for the release manager, <ahref="linguist-manual-2.html#2">lupdate</a> and <ahref="linguist-manual-2.html#3">lrelease</a>. These tools depend on <em>qmake</em> project files. You don't have to use <em>qmake</em>, though.</p>
<!-- index Release Manager --><p>Two tools are provided for the release manager, <ahref="linguist-manual-2.html#2">lupdate</a> and <ahref="linguist-manual-2.html#3">lrelease</a>. These tools depend on <em>tqmake</em> project files. You don't have to use <em>tqmake</em>, though.</p>
<p>A third tool, <tt>tqm2ts</tt>, can be used for converting TQt 2.x message files to <tt>.ts</tt> files.</p>
<h3><aname="1"></a>TQt Project Files</h3>
<!-- index .pro Files --><!-- index Project Files --><!-- index qmake!Project Files --><p><ahref="linguist-manual-2.html#2">lupdate</a> and <ahref="linguist-manual-2.html#3">lrelease</a> depend on information in the application's <tt>.pro</tt> TQt project file. There must be an entry in the <tt>TRANSLATIONS</tt> section of the project file for each language that is additional to the native language. A typical entry looks like this:</p>
<!-- index .pro Files --><!-- index Project Files --><!-- index tqmake!Project Files --><p><ahref="linguist-manual-2.html#2">lupdate</a> and <ahref="linguist-manual-2.html#3">lrelease</a> depend on information in the application's <tt>.pro</tt> TQt project file. There must be an entry in the <tt>TRANSLATIONS</tt> section of the project file for each language that is additional to the native language. A typical entry looks like this:</p>
<!-- index TRANSLATIONS!in Project Files --><pre> TRANSLATIONS = tt2_fr.ts \
<li><p>Run <ahref="linguist-manual-2.html#2">lupdate</a> to incorporate any new text added to the application. <ahref="linguist-manual-2.html#2">lupdate</a> synchronizes the user-visible text from the application with the translations; it does not destroy any data.</p>
<li><p>Steps 2 and 3 are repeated as often as necessary.</p>
<li><p>When a release of the application is needed <ahref="linguist-manual-2.html#3">lrelease</a> is run to read the <tt>.ts</tt> files and produce the <tt>.qm</tt> files used by the application at runtime.</p>
</ol><!-- index .pro Files --><!-- index Project Files --><!-- index qmake!Project Files --><p>For <ahref="linguist-manual-2.html#2">lupdate</a> to work successfully, it must know which translation files to produce. The files are simply listed in the application's <tt>.pro</tt> TQt project file, for example:</p>
</ol><!-- index .pro Files --><!-- index Project Files --><!-- index tqmake!Project Files --><p>For <ahref="linguist-manual-2.html#2">lupdate</a> to work successfully, it must know which translation files to produce. The files are simply listed in the application's <tt>.pro</tt> TQt project file, for example:</p>
<pre> TRANSLATIONS = tt2_fr.ts \
tt2_nl.ts
</pre>
@ -233,7 +233,7 @@ int main( int argc, char **argv )
</p>
<blockquote><palign="center"><em>Tutorial 1 Screenshot, English version</em></p></blockquote>
<h5><aname="2-1-3"></a>Creating a Latin Message File</h5>
<!-- index tt1.pro --><!-- index Latin --><p>The first step is to create a project file, <tt>tt1.pro</tt>, that lists all the source files for the project. The project file can be a qmake project file, or even an ordinary makefile. Any file that contains</p>
<!-- index tt1.pro --><!-- index Latin --><p>The first step is to create a project file, <tt>tt1.pro</tt>, that lists all the source files for the project. The project file can be a tqmake project file, or even an ordinary makefile. Any file that contains</p>
<!-- index SOURCES!in Project Files --><!-- index TRANSLATIONS!in Project Files --><pre> SOURCES = main.cpp
TRANSLATIONS = tt1_la.ts
</pre>
@ -283,7 +283,7 @@ int main( int argc, char **argv )
<p><em>qmake</em> is a tool created by Trolltech to write makefiles for different compilers and platforms.</p>
<p>Writing makefiles by hand can be difficult and error prone, especially if several makefiles are required for different compiler and platform combinations. With <em>qmake</em>, developers create a simple single 'project' file and run <em>qmake</em> to generate the appropriate makefiles. <em>qmake</em> takes care of all the compiler and platform dependencies, freeing developers to focus on their code. Trolltech uses <em>qmake</em> as the primary build tool for the TQt library, and for the tools supplied with TQt.</p>
<p><em>qmake</em> also takes care of TQt's special requirements, automatically including build rules for <ahref="tqmoc.html">tqmoc</a> and <em>tquic</em>.</p>
<p><em>tqmake</em> is a tool created by Trolltech to write makefiles for different compilers and platforms.</p>
<p>Writing makefiles by hand can be difficult and error prone, especially if several makefiles are required for different compiler and platform combinations. With <em>tqmake</em>, developers create a simple single 'project' file and run <em>tqmake</em> to generate the appropriate makefiles. <em>tqmake</em> takes care of all the compiler and platform dependencies, freeing developers to focus on their code. Trolltech uses <em>tqmake</em> as the primary build tool for the TQt library, and for the tools supplied with TQt.</p>
<p><em>tqmake</em> also takes care of TQt's special requirements, automatically including build rules for <ahref="tqmoc.html">tqmoc</a> and <em>tquic</em>.</p>
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><palign="right">[<ahref="qmake-manual-1.html">Prev: Introduction to qmake</a>] [<ahref="qmake-manual.html">Home</a>] [<ahref="qmake-manual-3.html">Next: The 10 minute guide to using qmake</a>]</p>
<h2align="center">Installing qmake</h2>
<h3><aname="1"></a>Installing qmake</h3>
<p><em>qmake</em> is built by default when TQt is built.</p>
<p>This section explains how to build <em>qmake</em> manually. Skip ahead to <ahref="qmake-manual-3.html">The 10 minute guide to using qmake</a>, if you already have <em>qmake</em>.</p>
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><palign="right">[<ahref="tqmake-manual-1.html">Prev: Introduction to tqmake</a>] [<ahref="tqmake-manual.html">Home</a>] [<ahref="tqmake-manual-3.html">Next: The 10 minute guide to using tqmake</a>]</p>
<h2align="center">Installing tqmake</h2>
<h3><aname="1"></a>Installing tqmake</h3>
<p><em>tqmake</em> is built by default when TQt is built.</p>
<p>This section explains how to build <em>tqmake</em> manually. Skip ahead to <ahref="tqmake-manual-3.html">The 10 minute guide to using tqmake</a>, if you already have <em>tqmake</em>.</p>
<p>Before building TQt manually the following environment variables must be set:</p>
<ul><li><p>QMAKESPEC <br> This must be set to the platform and compiler combination that you are using on your system. <br> For example, if you are using Windows and Microsoft Visual Studio, you would set this environment variable to <em>win32-msvc</em>. If you are using Solaris and g++, you would set this environment variable to <em>solaris-g++</em>.</p>
<p>The following is a list of environment variables available to choose from when setting QMAKESPEC:</p>
<li><p>TQTDIR <br> This must be set to where TQt is (or will be) installed. For example, <em>c:\qt</em> and <em>\local\qt</em></p>
</ul><p>Once the environment variables are set go into the qmake directory, <em>$TQTDIR/qmake</em>, e.g. <em>C:\qt\qmake</em>. Now run <em>make</em> or <em>nmake</em> depending on your compiler.</p>
<p>When the make has completed, <em>qmake</em> is ready for use.</p>
</ul><p>Once the environment variables are set go into the tqmake directory, <em>$TQTDIR/tqmake</em>, e.g. <em>C:\qt\tqmake</em>. Now run <em>make</em> or <em>nmake</em> depending on your compiler.</p>
<p>When the make has completed, <em>tqmake</em> is ready for use.</p>
<!-- eof -->
<palign="right">[<ahref="qmake-manual-1.html">Prev: Introduction to qmake</a>] [<ahref="qmake-manual.html">Home</a>] [<ahref="qmake-manual-3.html">Next: The 10 minute guide to using qmake</a>]</p>
<palign="right">[<ahref="tqmake-manual-1.html">Prev: Introduction to tqmake</a>] [<ahref="tqmake-manual.html">Home</a>] [<ahref="tqmake-manual-3.html">Next: The 10 minute guide to using tqmake</a>]</p>
<h2align="center">The 10 minute guide to using tqmake</h2>
<h3><aname="1"></a>Creating a project file</h3>
<p><em>qmake</em> uses information stored in project (.pro) files to determine what should go in the makefiles it generates.</p>
<p><em>tqmake</em> uses information stored in project (.pro) files to determine what should go in the makefiles it generates.</p>
<p>A basic project file contains information about the application, for example, which files are needed to compile the application, and which configuration settings to use.</p>
<p>Any of the approaches used to list source files may be used for header files.</p>
<p>The CONFIG line is used to give <em>qmake</em> information about the application's configuration.</p>
<p>The CONFIG line is used to give <em>tqmake</em> information about the application's configuration.</p>
<pre>
CONFIG += qt warn_on release
</pre>
<p>The "+=" is used here, because we add our configuration options to any that are already present. This is safer than using "=" which replaces all options with just those specified.</p>
<p>The <em>qt</em> part of the CONFIG line tells <em>qmake</em> that the application is built using TQt. This means that <em>qmake</em> will link against the TQt libraries when linking and add in the neccesary include paths for compiling.</p>
<p>The <em>warn_on</em> part of the CONFIG line tells <em>qmake</em> that it should set the compiler flags so that warnings are output.</p>
<p>The <em>release</em> part of the CONFIG line tells <em>qmake</em> that the application must be built as a release application. During development, programmers may prefer to replace <em>release</em> with <em>debug</em>, which is discussed later.</p>
<p>The <em>qt</em> part of the CONFIG line tells <em>tqmake</em> that the application is built using TQt. This means that <em>tqmake</em> will link against the TQt libraries when linking and add in the neccesary include paths for compiling.</p>
<p>The <em>warn_on</em> part of the CONFIG line tells <em>tqmake</em> that it should set the compiler flags so that warnings are output.</p>
<p>The <em>release</em> part of the CONFIG line tells <em>tqmake</em> that the application must be built as a release application. During development, programmers may prefer to replace <em>release</em> with <em>debug</em>, which is discussed later.</p>
<p>Project files are plain text (i.e. use an editor like notepad, vim or xemacs) and must be saved with a '.pro' extension. The name of the application's executable will be the same as the project file's name, but with an extension appropriate to the platform. For example, a project file called 'hello.pro' will produce 'hello.exe' on Windows and 'hello' on Unix.</p>
<h3><aname="2"></a>Generating a makefile</h3>
<p>When you have created your project file it is very easy to generate a makefile, all you need to do is go to where you have created your project file and type:</p>
<p>Makefiles are generated from the '.pro' files like this:</p>
<pre>
qmake -o Makefile hello.pro
tqmake -o Makefile hello.pro
</pre>
<p>For Visual Studio users, <em>qmake</em> can also generate '.dsp' files, for example:</p>
<p>For Visual Studio users, <em>tqmake</em> can also generate '.dsp' files, for example:</p>
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><palign="right">[<ahref="qmake-manual-3.html">Prev: The 10 minute guide to using qmake</a>] [<ahref="qmake-manual.html">Home</a>] [<ahref="qmake-manual-5.html">Next: qmake Concepts</a>]</p>
<h2align="center">qmake Tutorial</h2>
<h3><aname="1"></a>Introduction to the qmake tutorial</h3>
<p>This tutorial teaches you how to use <em>qmake</em>. We recommend that you read the <em>qmake</em> user guide after completing this tutorial.</p>
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><palign="right">[<ahref="tqmake-manual-3.html">Prev: The 10 minute guide to using tqmake</a>] [<ahref="tqmake-manual.html">Home</a>] [<ahref="tqmake-manual-5.html">Next: tqmake Concepts</a>]</p>
<h2align="center">tqmake Tutorial</h2>
<h3><aname="1"></a>Introduction to the tqmake tutorial</h3>
<p>This tutorial teaches you how to use <em>tqmake</em>. We recommend that you read the <em>tqmake</em> user guide after completing this tutorial.</p>
<h3><aname="2"></a>Starting off simple</h3>
<p>Let's assume that you have just finished a basic implementation of your application, and you have created the following files:</p>
<ul><li><p>hello.cpp</p>
<li><p>hello.h</p>
<li><p>main.cpp</p>
</ul><p>You will find these files in <em>qt/qmake/examples/tutorial</em>. The only other thing you know about the setup of the application is that it's written in TQt. First, using your favorite plain text editor, create a file called <em>hello.pro</em> in <em>qt/qmake/tutorial</em>. The first thing you need to do is add the lines that tell <em>qmake</em> about the source and header files that are part of your development project.</p>
</ul><p>You will find these files in <em>qt/tqmake/examples/tutorial</em>. The only other thing you know about the setup of the application is that it's written in TQt. First, using your favorite plain text editor, create a file called <em>hello.pro</em> in <em>qt/tqmake/tutorial</em>. The first thing you need to do is add the lines that tell <em>tqmake</em> about the source and header files that are part of your development project.</p>
<p>We'll add the source files to the project file first. To do this you need to use the SOURCES variable. Just start a new line with <em>SOURCES +=</em> and put hello.cpp after it. You should have something like:</p>
<p>The final step is to set the <em>CONFIG</em> variable. Since this is a TQt application, we need to put 'qt' on the CONFIG line so that <em>qmake</em> will add the relevant libraries to be linked against and ensure that build lines for <em>tqmoc</em> and <em>tquic</em> are included in the makefile.</p>
<p>The final step is to set the <em>CONFIG</em> variable. Since this is a TQt application, we need to put 'qt' on the CONFIG line so that <em>tqmake</em> will add the relevant libraries to be linked against and ensure that build lines for <em>tqmoc</em> and <em>tquic</em> are included in the makefile.</p>
<p>The finished project file should look like this:</p>
<p>Use <em>qmake</em> as before to generate a makefile and you will be able to debug your application.</p>
<p>Use <em>tqmake</em> as before to generate a makefile and you will be able to debug your application.</p>
<h3><aname="4"></a>Adding platform specific source files</h3>
<p>After a few hours of coding, you might have made a start on the platform specific part of your application, and decided to keep the platform dependent code separate. So you now have two new files to include into your project file - <em>hellowin.cpp</em> and <em>hellounix.cpp</em>. We can't just add these to the <em>SOURCES</em> variable since this will put both files in the makefile. So what we need to do here is to use a scope which will be processed depending on which platform <em>qmake</em> is run on.</p>
<p>After a few hours of coding, you might have made a start on the platform specific part of your application, and decided to keep the platform dependent code separate. So you now have two new files to include into your project file - <em>hellowin.cpp</em> and <em>hellounix.cpp</em>. We can't just add these to the <em>SOURCES</em> variable since this will put both files in the makefile. So what we need to do here is to use a scope which will be processed depending on which platform <em>tqmake</em> is run on.</p>
<p>A simple scope which will add in the platform dependent file for Windows looks like this:</p>
<pre>
win32 {
SOURCES += hellowin.cpp
}
</pre>
<p>So if <em>qmake</em> is run on Windows, it will add <em>hellowin.cpp</em> to the list of source files. If <em>qmake</em> is run on any other platform, it will simply ignore it. Now all that is left to be done is to create a scope for the unix dependent file.</p>
<p>So if <em>tqmake</em> is run on Windows, it will add <em>hellowin.cpp</em> to the list of source files. If <em>tqmake</em> is run on any other platform, it will simply ignore it. Now all that is left to be done is to create a scope for the unix dependent file.</p>
<p>When you have done that, your project file should now look something like this:</p>
<p>Use <em>qmake</em> as before to generate a makefile.</p>
<h3><aname="5"></a>Stopping qmake if a file doesn't exist</h3>
<p>You may not want to create a makefile if a certain file doesn't exist. We can check if a file exists by using the exists() function. We can stop <em>qmake</em> from processing by using the error() function. This works in the same way as scopes. Simply replace the scope condition with the function. A check for a main.cpp file looks like this:</p>
<p>Use <em>tqmake</em> as before to generate a makefile.</p>
<h3><aname="5"></a>Stopping tqmake if a file doesn't exist</h3>
<p>You may not want to create a makefile if a certain file doesn't exist. We can check if a file exists by using the exists() function. We can stop <em>tqmake</em> from processing by using the error() function. This works in the same way as scopes. Simply replace the scope condition with the function. A check for a main.cpp file looks like this:</p>
<p>Use <em>qmake</em> as before to generate a makefile. If you rename <em>main.cpp</em> temporarily, you will see the message and <em>qmake</em> will stop processing.</p>
<p>Use <em>tqmake</em> as before to generate a makefile. If you rename <em>main.cpp</em> temporarily, you will see the message and <em>tqmake</em> will stop processing.</p>
<h3><aname="6"></a>Checking for more than one condition</h3>
<p>Suppose you use Windows and you want to be able to see the tqDebug() statements when you run your application on the command line. Unless you build your application with the console setting, you won't see the output. We can easily put <em>console</em> on the CONFIG line so that on Windows the makefile will have this setting. But let's say that we only want to add the CONFIG line if we are running on Windows <em>and</em> when <em>debug</em> is already on the CONFIG line. This requires using two nested scopes; just create one scope, then create the other inside that one. Put the settings to be processed inside the last scope, like this:</p>
<p>That's it! You have now completed the tutorial for <em>qmake</em>, and are ready to write project files for your development projects.</p>
<p>That's it! You have now completed the tutorial for <em>tqmake</em>, and are ready to write project files for your development projects.</p>
<!-- eof -->
<palign="right">[<ahref="qmake-manual-3.html">Prev: The 10 minute guide to using qmake</a>] [<ahref="qmake-manual.html">Home</a>] [<ahref="qmake-manual-5.html">Next: qmake Concepts</a>]</p>
<palign="right">[<ahref="tqmake-manual-3.html">Prev: The 10 minute guide to using tqmake</a>] [<ahref="tqmake-manual.html">Home</a>] [<ahref="tqmake-manual-5.html">Next: tqmake Concepts</a>]</p>
<p><em>qmake</em> is an easy-to-use tool from Trolltech that creates makefiles for development projects across different platforms. <em>qmake</em> simplifies the generation of makefiles so that only a few lines of information are needed to create a makefile. <em>qmake</em> can be used for any software project whether it is written in TQt or not, although it also contains additional features to support TQt development.</p>
<p><em>qmake</em> generates a makefile based on the information in a project file. Project files are created by the developer. Project files are usually simple, but can be quite sophisticated if required. <em>qmake</em> can also generate projects for Microsoft Visual studio without having to change the project file.</p>
<p><em>tqmake</em> is an easy-to-use tool from Trolltech that creates makefiles for development projects across different platforms. <em>tqmake</em> simplifies the generation of makefiles so that only a few lines of information are needed to create a makefile. <em>tqmake</em> can be used for any software project whether it is written in TQt or not, although it also contains additional features to support TQt development.</p>
<p><em>tqmake</em> generates a makefile based on the information in a project file. Project files are created by the developer. Project files are usually simple, but can be quite sophisticated if required. <em>tqmake</em> can also generate projects for Microsoft Visual studio without having to change the project file.</p>
<p>Before <em>qmake</em> can be used to build makefiles, the QMAKESPEC environment variable must be set to the platform-compiler combination that is being used on the system. The QMAKESPEC environment variable tells qmake where to look to find platform and compiler specific information. This ensures that the right libraries are used, and that the generated makefile uses the correct syntax. A list of the currently supported platform-compiler combinations can be found in qt/mkspecs. Just set your environment variable to one of the directories listed.</p>
<p>Before <em>tqmake</em> can be used to build makefiles, the QMAKESPEC environment variable must be set to the platform-compiler combination that is being used on the system. The QMAKESPEC environment variable tells tqmake where to look to find platform and compiler specific information. This ensures that the right libraries are used, and that the generated makefile uses the correct syntax. A list of the currently supported platform-compiler combinations can be found in qt/mkspecs. Just set your environment variable to one of the directories listed.</p>
<p>For example, if you are using Microsoft Visual Studio on Windows, then you would set the QMAKESPEC environment variable to <em>win32-msvc</em>. If you are using gcc on Solaris then you would set your QMAKESPEC environment variable to <em>solaris-g++</em>.</p>
<p>Inside each of the directories in qt/mkspecs, there is a <em>qmake.conf</em> file which contains the platform and compiler specific information. These settings are applied to any project that is built using <em>qmake</em> and should not be modified unless you're an expert. For example, if all your applications had to link against a particular library, you might add this information to the relevant <em>qmake.conf</em> file.</p>
<p>Inside each of the directories in qt/mkspecs, there is a <em>tqmake.conf</em> file which contains the platform and compiler specific information. These settings are applied to any project that is built using <em>tqmake</em> and should not be modified unless you're an expert. For example, if all your applications had to link against a particular library, you might add this information to the relevant <em>tqmake.conf</em> file.</p>
<h4><aname="2-2"></a>Project (.pro) files</h4>
<p>A project file is used to tell <em>qmake</em> the details it needs to know about creating a makefile for the application. For instance, a list of source files and header files that should be put into the project file; any application specific configuration, such as an extra library that should be linked against, or an extra include path.</p>
<p>A project file is used to tell <em>tqmake</em> the details it needs to know about creating a makefile for the application. For instance, a list of source files and header files that should be put into the project file; any application specific configuration, such as an extra library that should be linked against, or an extra include path.</p>
<h5><aname="2-2-1"></a>'#' comments</h5>
<p>You can add comments to project files. Comments begin with the '#' symbol and run to the end of the line.</p>
<h4><aname="2-3"></a>Templates</h4>
<p>The template variable tells <em>qmake</em> what sort of makefile should be generated for the application. The following choices are available:</p>
<p>The template variable tells <em>tqmake</em> what sort of makefile should be generated for the application. The following choices are available:</p>
<ul><li><p>app - Creates a makefile that builds an application. This is the default, so if a template is not specified, this is used.</p>
<li><p>lib - Creates a makefile that builds a library.</p>
<li><p>vcapp - Creates a Visual Studio Project file which builds an application.</p>
<li><p>vclib - Creates a Visual Studio Project file which builds a library.</p>
<li><p>subdirs - This is a special template which creates a makefile which will go into the specified directories and create a makefile for the project file and call make on it.</p>
<p>The 'app' template tells <em>qmake</em> to generate a makefile that will build an application. When using this template the following <em>qmake</em> system variables are recognized. You should use these in your .pro file to specify information about your application.</p>
<p>The 'app' template tells <em>tqmake</em> to generate a makefile that will build an application. When using this template the following <em>tqmake</em> system variables are recognized. You should use these in your .pro file to specify information about your application.</p>
<ul><li><p>HEADERS - A list of all the header files for the application.</p>
<li><p>SOURCES - A list of all the source files for the application.</p>
<li><p>FORMS - A list of all the .ui files (created using <em>TQt Designer</em>) for the application.</p>
<li><p>DEF_FILE - Windows only: A .def file to be linked against for the application.</p>
<li><p>RC_FILE - Windows only: A resource file for the application.</p>
<li><p>RES_FILE - Windows only: A resource file to be linked against for the application.</p>
</ul><p>You only need to use the system variables that you have values for, for instance, if you don't have any extra INCLUDEPATHs then you don't need to specify any, <em>qmake</em> will add in the default ones needed. For instance, an example project file might look like this:</p>
</ul><p>You only need to use the system variables that you have values for, for instance, if you don't have any extra INCLUDEPATHs then you don't need to specify any, <em>tqmake</em> will add in the default ones needed. For instance, an example project file might look like this:</p>
<pre>
TEMPLATE = app
DESTDIR = c:\helloapp
@ -77,13 +77,13 @@ CONFIG += qt warn_on release
</pre>
<p>For items that are single valued, e.g. the template or the destination directory, we use "="; but for multi-valued items we use "+=" to <em>add</em> to the existing items of that type. Using "=" replaces the item's value with the new value, for example if we wrote <tt>DEFINES=QT_DLL</tt>, all other definitions would be deleted.</p>
<h5><aname="2-3-2"></a>The 'lib' template</h5>
<p>The 'lib' template tells <em>qmake</em> to generate a makefile that will build a library. When using this template, in addition to the system variables mentioned above for the 'app' template the <em>VERSION</em> variable is supported. You should use these in your .pro file to specify information about the library.</p>
<p>The 'lib' template tells <em>tqmake</em> to generate a makefile that will build a library. When using this template, in addition to the system variables mentioned above for the 'app' template the <em>VERSION</em> variable is supported. You should use these in your .pro file to specify information about the library.</p>
<ul><li><p>VERSION - The version number of the target library, for example, 2.3.1.</p>
<p>The 'subdirs' template tells qmake to generate a makefile that will go into the specified subdirectories and generate a makefile for the project file in the directory and call make on it.</p>
<p>The only system variable that is recognised for this template is the <em>SUBDIRS</em> variable. This variable contains a list of all the subdirectories that contain project files to be processed. It is essential that the project file in the sub directory has the same name as the subdirectory, so that <em>qmake</em> can find it. For example, if the subdirectory is called 'myapp' then the project file in that directory should be called <em>myapp.pro</em> in that directory.</p>
<p>The 'subdirs' template tells tqmake to generate a makefile that will go into the specified subdirectories and generate a makefile for the project file in the directory and call make on it.</p>
<p>The only system variable that is recognised for this template is the <em>SUBDIRS</em> variable. This variable contains a list of all the subdirectories that contain project files to be processed. It is essential that the project file in the sub directory has the same name as the subdirectory, so that <em>tqmake</em> can find it. For example, if the subdirectory is called 'myapp' then the project file in that directory should be called <em>myapp.pro</em> in that directory.</p>
<h4><aname="2-4"></a>The CONFIG variable</h4>
<p>The config variable specifies the options that the compiler should use and the libraries that should be linked against. Anything can be added to the config variable, but the options covered below are recognised by qmake internally.</p>
<p>The config variable specifies the options that the compiler should use and the libraries that should be linked against. Anything can be added to the config variable, but the options covered below are recognised by tqmake internally.</p>
<p>The following options control what compiler flags are used:</p>
<ul><li><p>release - The application is to be built in release mode. This is ignored if 'debug' is specified.</p>
<li><p>debug - The application is to be built in debug mode.</p>
@ -102,9 +102,9 @@ CONFIG += qt warn_on release
<pre>
CONFIG += qt thread debug
</pre>
<p>Note, that you must use "+=", not "=", or <em>qmake</em> will not be able to use the settings used to build TQt as a guide as what type of TQt library was built.</p>
<p>Note, that you must use "+=", not "=", or <em>tqmake</em> will not be able to use the settings used to build TQt as a guide as what type of TQt library was built.</p>
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><palign="right">[<ahref="qmake-manual-5.html">Prev: qmake Concepts</a>] [<ahref="qmake-manual.html">Home</a>] [<ahref="qmake-manual-7.html">Next: Using Precompiled Headers</a>]</p>
<h2align="center">qmake's Advanced Concepts</h2>
<h3><aname="1"></a>qmake's Advanced Concepts</h3>
<p>The <em>qmake</em> project files we've seen up to now have been very simple, just a list of <em>name = value</em> and <em>name += value</em> lines. <em>qmake</em> provides a lot more power, for example you can use a single project file to produce makefiles for multiple platforms.</p>
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><palign="right">[<ahref="tqmake-manual-5.html">Prev: tqmake Concepts</a>] [<ahref="tqmake-manual.html">Home</a>] [<ahref="tqmake-manual-7.html">Next: Using Precompiled Headers</a>]</p>
<p>The <em>tqmake</em> project files we've seen up to now have been very simple, just a list of <em>name = value</em> and <em>name += value</em> lines. <em>tqmake</em> provides a lot more power, for example you can use a single project file to produce makefiles for multiple platforms.</p>
<h3><aname="2"></a>Operators</h3>
<p>So far, you have seen the <em>=</em> operator and <em>+=</em> operator being used in a project file. There are more operators available for use; but some of these should be used carefully as they may change more than you expect them to.</p>
<p>The above code will add the QT_DLL define to the makefile if <em>qmake</em> is used on a Windows platform. If <em>qmake</em> is used on a different platform than Windows, the define will be ignored. You may also perform single line conditionals/assignments with qmake like this:</p>
<p>The above code will add the QT_DLL define to the makefile if <em>tqmake</em> is used on a Windows platform. If <em>tqmake</em> is used on a different platform than Windows, the define will be ignored. You may also perform single line conditionals/assignments with tqmake like this:</p>
<p>There are no restricitions on what you do to your own variables, as <em>qmake</em> will just ignore them unless it needs to look at them for a scope.</p>
<p>There are no restricitions on what you do to your own variables, as <em>tqmake</em> will just ignore them unless it needs to look at them for a scope.</p>
<p>You can also assign the value of a current variable to another variable by prefixing $$ to the variable name. For example:</p>
<p>The second notation allows you to adjoin the variable expansion to another value without separating by space. <em>qmake</em> will allow a variable to contain anything (including $(VALUE), which will be placed directly into the Makefile, and allow it to expand as appropriate, usually an environment variable). However, if you require an environment variable to be replaced immediately then you may use the $$() notation. For example:</p>
<p>The second notation allows you to adjoin the variable expansion to another value without separating by space. <em>tqmake</em> will allow a variable to contain anything (including $(VALUE), which will be placed directly into the Makefile, and allow it to expand as appropriate, usually an environment variable). However, if you require an environment variable to be replaced immediately then you may use the $$() notation. For example:</p>
contains( UNAME, [lL]inux ):message( This looks like Linux ($$UNAME) to me )
</pre>
<h3><aname="5"></a>Test Functions</h3>
<p><em>qmake</em> provides built-in functions that perform simple, yet powerful tests. These tests may be used in place of scopes (as described above), in some cases it is more usefull to use the test function by itself ignoring its test value.</p>
<p><em>tqmake</em> provides built-in functions that perform simple, yet powerful tests. These tests may be used in place of scopes (as described above), in some cases it is more usefull to use the test function by itself ignoring its test value.</p>
<h4><aname="5-1"></a>contains( variablename, value )</h4>
<p>If <em>value</em> is in the list of values stored in the variable called <em>variablename</em>, then the settings inside the scope will be processed. For example:</p>
<p>So if the command <em>ls /bin</em> returns 1 then <em>bin/main.cpp</em> is added to the list of sources and <em>bin/main.h</em> is added to the list of headers.</p>
<h4><aname="5-10"></a>infile( filename, var, val )</h4>
<p>This function will succeed if the file <em>filename</em> (when parsed by qmake itself) contains the variable <em>var</em> with a value of <em>val</em>. You may also not pass in a third argument (<em>val</em>) and the function will only test if <em>var</em> has been assigned to in the file.</p>
<p>This function will succeed if the file <em>filename</em> (when parsed by tqmake itself) contains the variable <em>var</em> with a value of <em>val</em>. You may also not pass in a third argument (<em>val</em>) and the function will only test if <em>var</em> has been assigned to in the file.</p>
<!-- eof -->
<palign="right">[<ahref="qmake-manual-5.html">Prev: qmake Concepts</a>] [<ahref="qmake-manual.html">Home</a>] [<ahref="qmake-manual-7.html">Next: Using Precompiled Headers</a>]</p>
<palign="right">[<ahref="tqmake-manual-5.html">Prev: tqmake Concepts</a>] [<ahref="tqmake-manual.html">Home</a>] [<ahref="tqmake-manual-7.html">Next: Using Precompiled Headers</a>]</p>
<aname="About"></a><h3><aname="1"></a>About Precompiled Headers<!-- index About Precompiled Headers --><!-- index Using Precompiled Headers --><!-- index Precompiled Headers --><!-- index PCH --></h3>
<p>Precompiled headers are a performance feature supported by some compilers to compile a stable body of code, and store the compiled state of the code in a binary file. During subsequent compilations, the compiler will load the stored state, and continue compiling the specified file. Each subsequent compilation is faster because the stable code does not need to be recompiled.</p>
<p><em>qmake</em> supports the use of precompiled headers (PCH) on some platforms and build environments, including:</p>
<p><em>tqmake</em> supports the use of precompiled headers (PCH) on some platforms and build environments, including:</p>
<p><em>qmake</em> will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as qmake will do this if the configuration supports PCH.</p>
<p><em>tqmake</em> will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as tqmake will do this if the configuration supports PCH.</p>
<p>All platforms that support precompiled headers have the configuration option <b>precompile_header</b> set. Using this option, you may trigger conditional blocks in your .pro file, to add settings when using PCH. For example:</p>
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><palign="right">[<ahref="qmake-manual-7.html">Prev: Using Precompiled Headers</a>] [<ahref="qmake-manual.html">Home</a>]</p>
<h2align="center"> qmake Command Reference</h2>
<h3><aname="1"></a>qmake Command Reference</h3>
<ul><li><p><ahref="qmake-manual-8.html#About">About This Reference</a></p>
<li><p><ahref="qmake-manual-8.html#Commands">Command Line Options</a></p>
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><palign="right">[<ahref="tqmake-manual-7.html">Prev: Using Precompiled Headers</a>] [<ahref="tqmake-manual.html">Home</a>]</p>
<h2align="center">tqmake Command Reference</h2>
<h3><aname="1"></a>tqmake Command Reference</h3>
<ul><li><p><ahref="tqmake-manual-8.html#About">About This Reference</a></p>
<li><p><ahref="tqmake-manual-8.html#Commands">Command Line Options</a></p>
</ul><aname="About"></a><h3><aname="2"></a>About This Reference</h3>
<p>This reference is a detailed index of all command line options, configurations and internal variables used by the cross-platform makefile generation utility <em>qmake</em>.</p>
<p>In addition to the variables and functions described in the following sections, <em>qmake</em> project files may also include comments. Comments begin with the '#' symbol and run to the end of the line.</p>
<p>This reference is a detailed index of all command line options, configurations and internal variables used by the cross-platform makefile generation utility <em>tqmake</em>.</p>
<p>In addition to the variables and functions described in the following sections, <em>tqmake</em> project files may also include comments. Comments begin with the '#' symbol and run to the end of the line.</p>
<aname="Commands"></a><h3><aname="3"></a>Command Line Options</h3>
<h4><aname="3-1"></a>Syntax</h4>
<pre>
qmake [options] files
tqmake [options] files
</pre>
<h4><aname="3-2"></a>Options</h4>
<p>The following options can be specified on the command line to <em>qmake</em>:</p>
<ul><li><p><tt>-o</tt> file <br><em>qmake</em> output will be directed to <em>file</em>. if this argument is not specified, then <em>qmake</em> will try to guess a suitable name. If '-' is specified, output is directed to stdout.</p>
<li><p><tt>-unix</tt><br><em>qmake</em> will run in unix mode. In this mode, Unix file naming and path conventions will be used, additionally testing for unix (as a scope) will succeed. This is the default mode on all Unices.</p>
<li><p><tt>-macx</tt><br><em>qmake</em> will run in Mac OS X mode. In this mode, Unix file naming and path conventions will be used, additionally testing for macx (as a scope) will succeed. This is the default mode on Mac OS X.</p>
<li><p><tt>-win32</tt><br><em>qmake</em> will run in win32 mode. In this mode, Windows file naming and path conventions will be used, additionally testing for win32 (as a scope) will succeed. This is the default mode on Windows.</p>
<li><p><tt>-d</tt><br><em>qmake</em> will output (hopefully) useful debugging information.</p>
<li><p><tt>-t</tt> tmpl <br><em>qmake</em> will override any set TEMPLATE variables with tmpl, but only <em>after</em> the .pro file has been processed.</p>
<li><p><tt>-tp</tt> prefix <br><em>qmake</em> will add the prefix to the TEMPLATE variable.</p>
<li><p><tt>-help</tt><br><em>qmake</em> will go over these features and give some useful help.</p>
<p>The following options can be specified on the command line to <em>tqmake</em>:</p>
<ul><li><p><tt>-o</tt> file <br><em>tqmake</em> output will be directed to <em>file</em>. if this argument is not specified, then <em>tqmake</em> will try to guess a suitable name. If '-' is specified, output is directed to stdout.</p>
<li><p><tt>-unix</tt><br><em>tqmake</em> will run in unix mode. In this mode, Unix file naming and path conventions will be used, additionally testing for unix (as a scope) will succeed. This is the default mode on all Unices.</p>
<li><p><tt>-macx</tt><br><em>tqmake</em> will run in Mac OS X mode. In this mode, Unix file naming and path conventions will be used, additionally testing for macx (as a scope) will succeed. This is the default mode on Mac OS X.</p>
<li><p><tt>-win32</tt><br><em>tqmake</em> will run in win32 mode. In this mode, Windows file naming and path conventions will be used, additionally testing for win32 (as a scope) will succeed. This is the default mode on Windows.</p>
<li><p><tt>-d</tt><br><em>tqmake</em> will output (hopefully) useful debugging information.</p>
<li><p><tt>-t</tt> tmpl <br><em>tqmake</em> will override any set TEMPLATE variables with tmpl, but only <em>after</em> the .pro file has been processed.</p>
<li><p><tt>-tp</tt> prefix <br><em>tqmake</em> will add the prefix to the TEMPLATE variable.</p>
<li><p><tt>-help</tt><br><em>tqmake</em> will go over these features and give some useful help.</p>
</ul><p>There are also warning options that can help to find problems in your project file:</p>
<ul><li><p><tt>-Wall</tt><br> With this <em>qmake</em> will turn on all known warnings.</p>
<li><p><tt>-Wnone</tt><br> No warning information will be generated by <em>qmake</em>.</p>
<li><p><tt>-Wparser</tt><br><em>qmake</em> will only generate parser warnings, this will alert you to common pitfalls, and potential problems in the parsing of your .pro files.</p>
<li><p><tt>-Wlogic</tt><br> Again <em>qmake</em> will warn of common pitfalls, and potential problems. This can include (but not limited to) checking if a file is placed into a list of files multiple times, if a file cannot be found, etc.</p>
</ul><p><em>qmake</em> supports two different modes of operation. The first mode, which is the default is makefile generation. In this mode, <em>qmake</em> will take a .pro file and turn it into a makefile. Creating makefiles is covered by this reference guide, there is another mode which generates .pro files.</p>
<p>To toggle between these modes you must specify in the first argument what mode you want to use. If no mode is specified, <em>qmake</em> will assume you want makefile mode. The available modes are:</p>
<ul><li><p><tt>-makefile</tt><br><em>qmake</em> output will be a makefile (<ahref="qmake-manual-8.html#MakefileMode">Makefile mode</a>).</p>
<li><p><tt>-project</tt><br><em>qmake</em> output will be a project file (<ahref="qmake-manual-8.html#ProjectfileMode">Project file mode</a>).</p>
<ul><li><p><tt>-Wall</tt><br> With this <em>tqmake</em> will turn on all known warnings.</p>
<li><p><tt>-Wnone</tt><br> No warning information will be generated by <em>tqmake</em>.</p>
<li><p><tt>-Wparser</tt><br><em>tqmake</em> will only generate parser warnings, this will alert you to common pitfalls, and potential problems in the parsing of your .pro files.</p>
<li><p><tt>-Wlogic</tt><br> Again <em>tqmake</em> will warn of common pitfalls, and potential problems. This can include (but not limited to) checking if a file is placed into a list of files multiple times, if a file cannot be found, etc.</p>
</ul><p><em>tqmake</em> supports two different modes of operation. The first mode, which is the default is makefile generation. In this mode, <em>tqmake</em> will take a .pro file and turn it into a makefile. Creating makefiles is covered by this reference guide, there is another mode which generates .pro files.</p>
<p>To toggle between these modes you must specify in the first argument what mode you want to use. If no mode is specified, <em>tqmake</em> will assume you want makefile mode. The available modes are:</p>
<ul><li><p><tt>-makefile</tt><br><em>tqmake</em> output will be a makefile (<ahref="tqmake-manual-8.html#MakefileMode">Makefile mode</a>).</p>
<li><p><tt>-project</tt><br><em>tqmake</em> output will be a project file (<ahref="tqmake-manual-8.html#ProjectfileMode">Project file mode</a>).</p>
<p>In Makefile mode <em>qmake</em> will generate a makefile. Additionally you may supply the following arguments in this mode:</p>
<ul><li><p><tt>-after</tt><br><em>qmake</em> will process assignments given on the commandline after the specified files.</p>
<li><p><tt>-nocache</tt><br><em>qmake</em> will ignore the .qmake.cache file.</p>
<li><p><tt>-nodepend</tt><br><em>qmake</em> will not generate any dependency information.</p>
<li><p><tt>-cache</tt> file <br><em>qmake</em> will use <em>file</em> as the cache file, ignoring any other .qmake.cache file found</p>
<li><p><tt>-spec</tt> spec <br><em>qmake</em> will use <em>spec</em> as a path to platform-compiler information and QMAKESPEC will be ignored.</p>
</ul><p>The <tt>files</tt> argument can be a list of one or more project files, separated by spaces. You may also pass qmake assignments on the command line here and they will be processed before all files specified, for example:</p>
<p>In Makefile mode <em>tqmake</em> will generate a makefile. Additionally you may supply the following arguments in this mode:</p>
<ul><li><p><tt>-after</tt><br><em>tqmake</em> will process assignments given on the commandline after the specified files.</p>
<li><p><tt>-nocache</tt><br><em>tqmake</em> will ignore the .tqmake.cache file.</p>
<li><p><tt>-nodepend</tt><br><em>tqmake</em> will not generate any dependency information.</p>
<li><p><tt>-cache</tt> file <br><em>tqmake</em> will use <em>file</em> as the cache file, ignoring any other .tqmake.cache file found</p>
<li><p><tt>-spec</tt> spec <br><em>tqmake</em> will use <em>spec</em> as a path to platform-compiler information and QMAKESPEC will be ignored.</p>
</ul><p>The <tt>files</tt> argument can be a list of one or more project files, separated by spaces. You may also pass tqmake assignments on the command line here and they will be processed before all files specified, for example:</p>
<p>If however you are certain you want your variables processed after the the files specified, then you may pass the -after argument. When this is specified all assignments on the commandline after the -after option will be postponed until after the specified files are parsed.</p>
<p>This will generate a Makefile, from test.pro with Unix pathnames. However many of these arguments aren't necessary as they are the default. Therefore the line can be simplified on Unix to:</p>
<p>In Projectfile mode <em>qmake</em> will generate a project file. Additionally, you may supply the following arguments in this mode:</p>
<ul><li><p><tt>-r</tt><br><em>qmake</em> will look through supplied directories recursively</p>
<li><p><tt>-nopwd</tt><br><em>qmake</em> will not look in your current working directory for source code and only use the specified <tt>files</tt></p>
</ul><p>The <tt>files</tt> argument can be a list of files or directories. If a directory is specified, then it will be included in the <ahref="qmake-manual-8.html#DEPENDPATH">DEPENDPATH</a> variable and relevant code from there will be included in the generated project file, if a file is given it will go into the correct variable depending on extension (i.e. .ui files go into FORMS, .cpp files go into SOURCES, etc). Here too you may pass assignments on the commandline, when doing so these assignments will be placed last in the generated .pro file.</p>
<p>In Projectfile mode <em>tqmake</em> will generate a project file. Additionally, you may supply the following arguments in this mode:</p>
<ul><li><p><tt>-r</tt><br><em>tqmake</em> will look through supplied directories recursively</p>
<li><p><tt>-nopwd</tt><br><em>tqmake</em> will not look in your current working directory for source code and only use the specified <tt>files</tt></p>
</ul><p>The <tt>files</tt> argument can be a list of files or directories. If a directory is specified, then it will be included in the <ahref="tqmake-manual-8.html#DEPENDPATH">DEPENDPATH</a> variable and relevant code from there will be included in the generated project file, if a file is given it will go into the correct variable depending on extension (i.e. .ui files go into FORMS, .cpp files go into SOURCES, etc). Here too you may pass assignments on the commandline, when doing so these assignments will be placed last in the generated .pro file.</p>
<p>The <tt>CONFIG</tt> variable specifies project configuration and compiler options. The values will be recognized internally by <em>qmake</em> and have special meaning. They are as follows.</p>
<p>The <tt>CONFIG</tt> variable specifies project configuration and compiler options. The values will be recognized internally by <em>tqmake</em> and have special meaning. They are as follows.</p>
<p>These <tt>CONFIG</tt> values control compilation flags:</p>
<ul><li><p>release - Compile with optimization enabled, ignored if "debug" is specified</p>
<li><p>debug - Compile with debug options enabled</p>
<p><em>qmake</em> will generate dependency information (unless -nodepend is specified on the <ahref="qmake-manual-8.html#Commands">command line</a>) for the specified headers. <em>qmake</em> will also automatically detect if <em>tqmoc</em> is required by the classes in these headers, and add the appropriate dependencies and files to the project for generating and linking the tqmoc files.</p>
<p><em>tqmake</em> will generate dependency information (unless -nodepend is specified on the <ahref="tqmake-manual-8.html#Commands">command line</a>) for the specified headers. <em>tqmake</em> will also automatically detect if <em>tqmoc</em> is required by the classes in these headers, and add the appropriate dependencies and files to the project for generating and linking the tqmoc files.</p>
<p>For example:</p>
<pre>
HEADERS = myclass.h \
login.h \
mainwindow.h
</pre>
<p>See also <ahref="qmake-manual-8.html#SOURCES">SOURCES</a>.</p>
<p>See also <ahref="tqmake-manual-8.html#SOURCES">SOURCES</a>.</p>
<p>This variable specifies the #include directories which should be searched when compiling the project. Use ';' or a space as the directory separator.</p>
<p>This variable contains a list of libraries to be linked into the project. If you are more comfortable with the Unix convension of -L/-l flags you are free to use them in a cross-platform manner and qmake will do the correct thing with these libraries on Windows (namely this means passing the full path of the library to the linker). The only limitation to this is the library must exist, for qmake to find which directory a -l lib lives in.</p>
<p>This variable contains a list of libraries to be linked into the project. If you are more comfortable with the Unix convension of -L/-l flags you are free to use them in a cross-platform manner and tqmake will do the correct thing with these libraries on Windows (namely this means passing the full path of the library to the linker). The only limitation to this is the library must exist, for tqmake to find which directory a -l lib lives in.</p>
<p>This is a special variable processed by <em>qmake</em>. If the contents of this variable do not appear in CONFIG by the time this variable is assigned, then a minimal makefile will be generated that states what dependencies (the values assigned to REQUIRES) are missing.</p>
<p>This is a special variable processed by <em>tqmake</em>. If the contents of this variable do not appear in CONFIG by the time this variable is assigned, then a minimal makefile will be generated that states what dependencies (the values assigned to REQUIRES) are missing.</p>
<p>This is mainly used in TQt's build system for building the examples.</p>
<p>This variable contains the name of all source files in the project.</p>
@ -223,9 +223,9 @@ SOURCES = myclass.cpp \
mainwindow.cpp
</pre>
<p>See also <ahref="qmake-manual-8.html#HEADERS">HEADERS</a></p>
<p>See also <ahref="tqmake-manual-8.html#HEADERS">HEADERS</a></p>
<h5><aname="4-1-18"></a>SUBDIRS</h5>
<p>This variable, when used with the 'subdirs' <ahref="qmake-manual-8.html#TEMPLATE">TEMPLATE</a> contains the names of all subdirectories to look for a project file.</p>
<p>This variable, when used with the 'subdirs' <ahref="tqmake-manual-8.html#TEMPLATE">TEMPLATE</a> contains the names of all subdirectories to look for a project file.</p>
<p>For example:</p>
<pre>
SUBDIRS = kernel \
@ -255,7 +255,7 @@ TARGET = mylib
</pre>
<p>The template can be overridden by specifying a new template type with the <tt>-t</tt> command line option. This overrides the template type <em>after</em> the .pro file has been processed. With .pro files that use the template type to determine how the project is built, it is necessary to declare TEMPLATE on the command line rather than use the <tt>-t</tt> option.</p>
<h5><aname="4-1-21"></a>VERSION</h5>
<p>This variable contains the version number of the library if the 'lib' <ahref="qmake-manual-8.html#TEMPLATE">TEMPLATE</a> is specified.</p>
<p>This variable contains the version number of the library if the 'lib' <ahref="tqmake-manual-8.html#TEMPLATE">TEMPLATE</a> is specified.</p>
<p>This variable is set internally by <em>qmake</em>, which is basically the DESTDIR variable with the TARGET variable appened at the end. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is set internally by <em>tqmake</em>, which is basically the DESTDIR variable with the TARGET variable appened at the end. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is set internally by <em>qmake</em>, which specifies where the dsp template file for basing generated dsp files is stored. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is set internally by <em>tqmake</em>, which specifies where the dsp template file for basing generated dsp files is stored. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains a list of lex implementation files. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains a list of lex implementation files. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the names of intermediate lex object files.The value of this variable is typically handled by <em>qmake</em> and rarely needs to be modified.</p>
<p>This variable contains the names of intermediate lex object files.The value of this variable is typically handled by <em>tqmake</em> and rarely needs to be modified.</p>
<p>This variable is used whenever a literal hash character (<tt>#</tt>) is needed in a variable declaration, perhaps as part of a file name or in a string passed to some external application.</p>
<p>For example:</p>
<pre>
# To include a literal hash character, use the $$LITERAL_HASH variable:
<p>By using <tt>LITERAL_HASH</tt> in this way, the <tt>#</tt> character can be used to construct a URL for the <tt>message()</tt> function to print to the console.</p>
<p>This variable specifies the name of the makefile which <em>qmake</em> should use when outputting the dependency information for building a project. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable specifies the name of the makefile which <em>tqmake</em> should use when outputting the dependency information for building a project. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the name of the makefile generator to use when generating a makefile. The value of this variable is typically handled internally by <em>qmake</em> and rarely needs to be modified.</p>
<p>This variable contains the name of the makefile generator to use when generating a makefile. The value of this variable is typically handled internally by <em>tqmake</em> and rarely needs to be modified.</p>
<p>This variable is generated from the <ahref="qmake-manual-8.html#SOURCES">SOURCES</a> variable. The extension of each source file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is generated from the <ahref="tqmake-manual-8.html#SOURCES">SOURCES</a> variable. The extension of each source file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is set by <em>qmake</em> if files can be found that contain the TQ_OBJECT macro. <tt>OBJMOC</tt> contains the name of all intermediate tqmoc object files. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is set by <em>tqmake</em> if files can be found that contain the TQ_OBJECT macro. <tt>OBJMOC</tt> contains the name of all intermediate tqmoc object files. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable indicates the header file for creating a precompiled header file, to increase the compilation speed of a project. Precompiled headers are currently only supported on some platforms (Windows - all MSVC project types, Mac OS X - Xcode, Makefile, UNIX - gcc 3.3 and up).</p>
<p>On other platforms, this variable has different meaning, as noted below.</p>
<p>This variable contains a list of header files that require some sort of pre-compilation step (such as with tqmoc). The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains a list of header files that require some sort of pre-compilation step (such as with tqmoc). The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the name of the <em>qmake</em> program itself and is placed in generated makefiles. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the name of the <em>tqmake</em> program itself and is placed in generated makefiles. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the name of the <em>qmake</em> configuration to use when generating makefiles. The value of this variable is typically handled by <em>qmake</em> and rarely needs to be modified. Use the <ahref="qmake-manual-8.html#QMAKESPEC">QMAKESPEC</a> environment variable instead.</p>
<p>This variable contains the name of the <em>tqmake</em> configuration to use when generating makefiles. The value of this variable is typically handled by <em>tqmake</em> and rarely needs to be modified. Use the <ahref="tqmake-manual-8.html#QMAKESPEC">QMAKESPEC</a> environment variable instead.</p>
<p>This variable is empty unless the 'app' <ahref="qmake-manual-8.html#TEMPLATE">TEMPLATE</a> is specified. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified. Use the following instead:</p>
<p>This variable is empty unless the 'app' <ahref="tqmake-manual-8.html#TEMPLATE">TEMPLATE</a> is specified. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified. Use the following instead:</p>
<p>This variable is empty unless the 'app' or 'dll' <ahref="qmake-manual-8.html#TEMPLATE">TEMPLATE</a> is specified. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is empty unless the 'app' or 'dll' <ahref="tqmake-manual-8.html#TEMPLATE">TEMPLATE</a> is specified. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p><em>This is used on Unix platforms only</em></p>
<p>This variable contains the command for invoking the program which creates, modifies and extracts archives. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the command for invoking the program which creates, modifies and extracts archives. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the flags for the C compiler in debug mode.The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the flags for the C compiler in debug mode.The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a multi-threaded application or when the version of TQt that you link against is a multi-threaded statically linked library. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a multi-threaded application or when the version of TQt that you link against is a multi-threaded statically linked library. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a debuggable multi-threaded application or when the version of TQt that you link against is a debuggable multi-threaded statically linked library. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a debuggable multi-threaded application or when the version of TQt that you link against is a debuggable multi-threaded statically linked library. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a multi-threaded dll or when the version of TQt that you link against is a multi-threaded dll. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a multi-threaded dll or when the version of TQt that you link against is a multi-threaded dll. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a debuggable multi-threaded dll or when the version of TQt that you link against is a debuggable multi-threaded statically linked library. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a debuggable multi-threaded dll or when the version of TQt that you link against is a debuggable multi-threaded statically linked library. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a non-debuggable application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a non-debuggable application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p><em>This is used on Unix platforms only</em></p>
<p>This variable contains the compiler flags for creating a shared library. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a shared library. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a multi-threaded application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the compiler flags for creating a multi-threaded application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is not empty if the warn_off <ahref="qmake-manual-8.html#TEMPLATE">TEMPLATE</a> option is specified. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is not empty if the warn_off <ahref="tqmake-manual-8.html#TEMPLATE">TEMPLATE</a> option is specified. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is not empty if the warn_on <ahref="qmake-manual-8.html#TEMPLATE">TEMPLATE</a> option is specified. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is not empty if the warn_on <ahref="tqmake-manual-8.html#TEMPLATE">TEMPLATE</a> option is specified. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains any files which are not generated files (such as tqmoc and tquic generated files) and object files that should be removed when using "make clean".</p>
<p>This variable contains the C++ compiler flags for creating a debuggable application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a debuggable application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a multi-threaded application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a multi-threaded application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a debuggable multi-threaded application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a debuggable multi-threaded application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a multi-threaded dll. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a multi-threaded dll. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a multi-threaded debuggable dll. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a multi-threaded debuggable dll. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating an application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating an application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a shared library. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a shared library. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a multi-threaded application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for creating a multi-threaded application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for suppressing compiler warnings. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the C++ compiler flags for suppressing compiler warnings. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains C++ compiler flags for generating compiler warnings. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains C++ compiler flags for generating compiler warnings. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the extention for shared libraries. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the extention for shared libraries. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the list of requirements that were failed to be met when <em>qmake</em> was used. For example, the sql module is needed and wasn't compiled into TQt. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the list of requirements that were failed to be met when <em>tqmake</em> was used. For example, the sql module is needed and wasn't compiled into TQt. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the file tags needed to be entered into the makefile, such as SOURCES and HEADERS. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the file tags needed to be entered into the makefile, such as SOURCES and HEADERS. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of all known header files to be added to INCLUDEPATH when building an application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of all known header files to be added to INCLUDEPATH when building an application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>All libraries that the <ahref="qmake-manual-8.html#TARGET">target</a> depends on can be listed in this variable. Some backends do not support this, these include MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is support internally by these build tools, this is usefull for explicitly listing dependant static libraries.</p>
<p>This list will go after all builtin (and <ahref="qmake-manual-8.html#PRE_TARGETDEPS">$$PRE_TARGETDEPS</a>) dependencies.</p>
<p>All libraries that the <ahref="tqmake-manual-8.html#TARGET">target</a> depends on can be listed in this variable. Some backends do not support this, these include MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is support internally by these build tools, this is usefull for explicitly listing dependant static libraries.</p>
<p>This list will go after all builtin (and <ahref="tqmake-manual-8.html#PRE_TARGETDEPS">$$PRE_TARGETDEPS</a>) dependencies.</p>
<p>All libraries that the <ahref="qmake-manual-8.html#TARGET">target</a> depends on can be listed in this variable. Some backends do not support this, these include MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is support internally by these build tools, this is usefull for explicitly listing dependant static libraries.</p>
<p>All libraries that the <ahref="tqmake-manual-8.html#TARGET">target</a> depends on can be listed in this variable. Some backends do not support this, these include MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is support internally by these build tools, this is usefull for explicitly listing dependant static libraries.</p>
<p>This list will go before all builtin dependencies.</p>
<p>This variable contains the location of OpenGL header files to be added to INCLUDEPATH when building an application with OpenGL support. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of OpenGL header files to be added to INCLUDEPATH when building an application with OpenGL support. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of all known header file paths to be added to INCLUDEPATH when building a TQt application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of all known header file paths to be added to INCLUDEPATH when building a TQt application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of all known header file paths to be added to INCLUDEPATH when building a multi-threaded application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of all known header file paths to be added to INCLUDEPATH when building a multi-threaded application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p><em>This is used on Unix platforms only</em></p>
<p>This variable contains the location of X11 header file paths to be added to INCLUDEPATH when building a X11 application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of X11 header file paths to be added to INCLUDEPATH when building a X11 application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building console programs. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building console programs. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building console dlls. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building console dlls. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-49"></a>QMAKE_LFLAGS_DEBUG</h5>
<p>This variable contains link flags when building debuggable applications. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building debuggable applications. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-50"></a>QMAKE_LFLAGS_PLUGIN</h5>
<p>This variable contains link flags when building plugins. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building plugins. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-51"></a>QMAKE_LFLAGS_QT_DLL</h5>
<p>This variable contains link flags when building programs that use the TQt library built as a dll. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building programs that use the TQt library built as a dll. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-52"></a>QMAKE_LFLAGS_RELEASE</h5>
<p>This variable contains link flags when building applications for release. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building applications for release. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-53"></a>QMAKE_LFLAGS_SHAPP</h5>
<p>This variable contains link flags when building applications which are using the 'app' template. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building applications which are using the 'app' template. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-54"></a>QMAKE_LFLAGS_SHLIB</h5>
<p>This variable contains link flags when building shared libraries The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building shared libraries The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-55"></a>QMAKE_LFLAGS_SONAME</h5>
<p>This variable specifies the link flags to set the name of shared objects, such as .so or .dll. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable specifies the link flags to set the name of shared objects, such as .so or .dll. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-56"></a>QMAKE_LFLAGS_THREAD</h5>
<p>This variable contains link flags when building multi-threaded projects. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building multi-threaded projects. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-57"></a>QMAKE_LFLAGS_WINDOWS</h5>
<p><em>This is used on Windows only</em></p>
<p>This variable contains link flags when building windows projects. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building windows projects. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building windows dll projects. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains link flags when building windows dll projects. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-59"></a>QMAKE_LIBDIR</h5>
<p>This variable contains the location of all known library directories.The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of all known library directories.The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-60"></a>QMAKE_LIBDIR_FLAGS</h5>
<p><em>This is used on Unix platforms only</em></p>
<p>This variable contains the location of all library directory with -L prefixed. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of all library directory with -L prefixed. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-61"></a>VPATH</h5>
<p>This variable tells <em>qmake</em> where to search for files it cannot open. With this you may tell <em>qmake</em> where it may look for things like SOURCES, and if it finds an entry in SOURCES that cannot be opened it will look through the entire VPATH list to see if it can find the file on its own.</p>
<p>See also <ahref="qmake-manual-8.html#DEPENDPATH">DEPENDPATH</a>.</p>
<p>This variable tells <em>tqmake</em> where to search for files it cannot open. With this you may tell <em>tqmake</em> where it may look for things like SOURCES, and if it finds an entry in SOURCES that cannot be opened it will look through the entire VPATH list to see if it can find the file on its own.</p>
<p>See also <ahref="tqmake-manual-8.html#DEPENDPATH">DEPENDPATH</a>.</p>
<p>This variable contains the list of all directories to look in to resolve dependencies. This will be used when crawling through 'included' files.</p>
<h5><aname="4-2-63"></a>QMAKE_LIBDIR_OPENGL</h5>
<p>This variable contains the location of the OpenGL library directory.The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of the OpenGL library directory.The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-64"></a>QMAKE_LIBDIR_TQT</h5>
<p>This variable contains the location of the TQt library directory.The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of the TQt library directory.The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-65"></a>QMAKE_LIBDIR_X11</h5>
<p><em>This is used on Unix platforms only</em></p>
<p>This variable contains the location of the X11 library directory.The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of the X11 library directory.The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-66"></a>QMAKE_LIBS</h5>
<p>This variable contains all project libraries. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all project libraries. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-67"></a>QMAKE_LIBS_CONSOLE</h5>
<p><em>This is used on Windows only</em></p>
<p>This variable contains all project libraries that should be linked against when building a console application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all project libraries that should be linked against when building a console application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-68"></a>QMAKE_LIBS_OPENGL</h5>
<p>This variable contains all OpenGL libraries. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all OpenGL libraries. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-69"></a>QMAKE_LIBS_OPENGL_QT</h5>
<p>This variable contains all OpenGL TQt libraries.The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all OpenGL TQt libraries.The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-70"></a>QMAKE_LIBS_QT</h5>
<p>This variable contains all TQt libraries.The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all TQt libraries.The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-71"></a>QMAKE_LIBS_QT_DLL</h5>
<p><em>This is used on Windows only</em></p>
<p>This variable contains all TQt libraries when TQt is built as a dll. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all TQt libraries when TQt is built as a dll. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-72"></a>QMAKE_LIBS_QT_OPENGL</h5>
<p>This variable contains all the libraries needed to link against if OpenGL support is turned on. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all the libraries needed to link against if OpenGL support is turned on. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-73"></a>QMAKE_LIBS_QT_THREAD</h5>
<p>This variable contains all the libraries needed to link against if thread support is turned on. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all the libraries needed to link against if thread support is turned on. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-75"></a>QMAKE_LIBS_RTMT</h5>
<p><em>This is used with Borland compilers only</em></p>
<p>This variable contains the runtime library needed to link against when building a multi-threaded application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the runtime library needed to link against when building a multi-threaded application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-76"></a>QMAKE_LIBS_THREAD</h5>
<p><em>This is used on Unix platforms only</em></p>
<p>This variable contains all libraries that need to be linked against when building a multi-threaded application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all libraries that need to be linked against when building a multi-threaded application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-77"></a>QMAKE_LIBS_WINDOWS</h5>
<p><em>This is used on Windows only</em></p>
<p>This variable contains all windows libraries.The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all windows libraries.The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-78"></a>QMAKE_LIBS_X11</h5>
<p><em>This is used on Unix platforms only</em></p>
<p>This variable contains all X11 libraries.The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all X11 libraries.The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-79"></a>QMAKE_LIBS_X11SM</h5>
<p><em>This is used on Unix platforms only</em></p>
<p>This variable contains all X11 session management libraries. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains all X11 session management libraries. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-80"></a>QMAKE_LIB_FLAG</h5>
<p>This variable is not empty if the 'lib' template is specified. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is not empty if the 'lib' template is specified. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-81"></a>QMAKE_LINK_SHLIB_CMD</h5>
<p>This variable contains the command to execute when creating a shared library. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the command to execute when creating a shared library. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-82"></a>QMAKE_POST_LINK</h5>
<p>This variable contains the command to execute after linking the TARGET together. This variable is normally empty and therefore nothing is executed, additionally some backends will not support this - mostly only Makefile backends.</p>
<h5><aname="4-2-83"></a>QMAKE_PRE_LINK</h5>
<p>This variable contains the command to execute before linking the TARGET together. This variable is normally empty and therefore nothing is executed, additionally some backends will not support this - mostly only Makefile backends.</p>
<h5><aname="4-2-84"></a>QMAKE_LN_SHLIB</h5>
<p>This variable contains the command to execute when creating a link to a shared library. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the command to execute when creating a link to a shared library. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-85"></a>QMAKE_MAKEFILE</h5>
<p>This variable contains the name of the makefile to create. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the name of the makefile to create. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-86"></a>QMAKE_MOC_SRC</h5>
<p>This variable contains the names of all tqmoc source files to generate and include in the project. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the names of all tqmoc source files to generate and include in the project. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-87"></a>QMAKE_QMAKE</h5>
<p>This variable contains the location of qmake if it is not in the path. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of tqmake if it is not in the path. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-88"></a>QMAKE_QT_DLL</h5>
<p>This variable is not empty if TQt was built as a dll. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is not empty if TQt was built as a dll. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-89"></a>QMAKE_RUN_CC</h5>
<p>This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-90"></a>QMAKE_RUN_CC_IMP</h5>
<p>This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-91"></a>QMAKE_RUN_CXX</h5>
<p>This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-92"></a>QMAKE_RUN_CXX_IMP</h5>
<p>This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable specifies the individual rule needed to build an object. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-93"></a>QMAKE_TARGET</h5>
<p>This variable contains the name of the project target. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the name of the project target. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-94"></a>QMAKE_UIC</h5>
<p>This variable contains the location of tquic if it is not in the path. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the location of tquic if it is not in the path. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p>It can be used to specify arguments to tquic as well, such as additional plugin paths. For example:</p>
<pre>
QMAKE_UIC = tquic -L /path/to/plugin
</pre>
<h5><aname="4-2-95"></a>RC_FILE</h5>
<p>This variable contains the name of the resource file for the application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the name of the resource file for the application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-96"></a>RES_FILE</h5>
<p>This variable contains the name of the resource file for the application. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains the name of the resource file for the application. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-97"></a>SRCMOC</h5>
<p>This variable is set by <em>qmake</em> if files can be found that contain the TQ_OBJECT macro. <tt>SRCMOC</tt> contains the name of all the generated tqmoc files. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is set by <em>tqmake</em> if files can be found that contain the TQ_OBJECT macro. <tt>SRCMOC</tt> contains the name of all the generated tqmoc files. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-98"></a>TARGET_EXT</h5>
<p>This variable specifies the target's extension. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable specifies the target's extension. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-99"></a>TARGET_x</h5>
<p>This variable specifies the target's extension with a major version number. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable specifies the target's extension with a major version number. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-100"></a>TARGET_x.y.z</h5>
<p>This variable specifies the target's extension with version number. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable specifies the target's extension with version number. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-101"></a>UICIMPLS</h5>
<p>This variable contains a list of the generated implementation files by TQUIC. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains a list of the generated implementation files by TQUIC. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-102"></a>UICOBJECTS</h5>
<p>This variable is generated from the UICIMPLS variable. The extension of each file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable is generated from the UICIMPLS variable. The extension of each file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-103"></a>VER_MAJ</h5>
<p>This variable contains the major version number of the library, if the 'lib' <ahref="qmake-manual-8.html#TEMPLATE">template</a> is specified.</p>
<p>This variable contains the major version number of the library, if the 'lib' <ahref="tqmake-manual-8.html#TEMPLATE">template</a> is specified.</p>
<h5><aname="4-2-104"></a>VER_MIN</h5>
<p>This variable contains the minor version number of the library, if the 'lib' <ahref="qmake-manual-8.html#TEMPLATE">template</a> is specified.</p>
<p>This variable contains the minor version number of the library, if the 'lib' <ahref="tqmake-manual-8.html#TEMPLATE">template</a> is specified.</p>
<h5><aname="4-2-105"></a>VER_PAT</h5>
<p>This variable contains the patch version number of the library, if the 'lib' <ahref="qmake-manual-8.html#TEMPLATE">template</a> is specified.</p>
<p>This variable contains the patch version number of the library, if the 'lib' <ahref="tqmake-manual-8.html#TEMPLATE">template</a> is specified.</p>
<h5><aname="4-2-106"></a>QMAKE_EXT_MOC</h5>
<p>This variable changes the extention used on included tqmoc files.</p>
<p>See also <ahref="qmake-manual-8.html#Extensions">File Extensions</a>.</p>
<p>See also <ahref="tqmake-manual-8.html#Extensions">File Extensions</a>.</p>
<h5><aname="4-2-107"></a>QMAKE_EXT_UI</h5>
<p>This variable changes the extention used on /e Designer UI files.</p>
<p>See also <ahref="qmake-manual-8.html#Extensions">File Extensions</a>.</p>
<p>See also <ahref="tqmake-manual-8.html#Extensions">File Extensions</a>.</p>
<h5><aname="4-2-108"></a>QMAKE_EXT_PRL</h5>
<p>This variable changes the extention used on created PRL files.</p>
<p>See also <ahref="qmake-manual-8.html#Extensions">File Extensions</a>, <ahref="qmake-manual-8.html#LibDepend">Library Dependencies</a>.</p>
<p>See also <ahref="tqmake-manual-8.html#Extensions">File Extensions</a>, <ahref="tqmake-manual-8.html#LibDepend">Library Dependencies</a>.</p>
<h5><aname="4-2-109"></a>QMAKE_EXT_LEX</h5>
<p>This variable changes the extention used on files given to lex.</p>
<p>See also <ahref="qmake-manual-8.html#Extensions">File Extensions</a>, <ahref="qmake-manual-8.html#LEXSOURCES">LEXSOURCES</a>.</p>
<p>See also <ahref="tqmake-manual-8.html#Extensions">File Extensions</a>, <ahref="tqmake-manual-8.html#LEXSOURCES">LEXSOURCES</a>.</p>
<h5><aname="4-2-110"></a>QMAKE_EXT_YACC This variable changes the extention used on files given to yacc.</h5>
<p>See also <ahref="qmake-manual-8.html#Extensions">File Extensions</a>, <ahref="qmake-manual-8.html#LEXSOURCES">YACCSOURCES</a>.</p>
<p>See also <ahref="tqmake-manual-8.html#Extensions">File Extensions</a>, <ahref="tqmake-manual-8.html#LEXSOURCES">YACCSOURCES</a>.</p>
<h5><aname="4-2-111"></a>QMAKE_EXT_OBJ</h5>
<p>This variable changes the extention used on generated object files.</p>
<p>See also <ahref="qmake-manual-8.html#Extensions">File Extensions</a>.</p>
<p>See also <ahref="tqmake-manual-8.html#Extensions">File Extensions</a>.</p>
<h5><aname="4-2-112"></a>QMAKE_EXT_CPP</h5>
<p>This variable changes the interpretation of all suffixes in this list of values as files of type C++ source code.</p>
<p>See also <ahref="qmake-manual-8.html#Extensions">File Extensions</a>.</p>
<p>See also <ahref="tqmake-manual-8.html#Extensions">File Extensions</a>.</p>
<h5><aname="4-2-113"></a>QMAKE_EXT_H</h5>
<p>This variable changes the interpretation of all suffixes in this list of values as files of type C header files.</p>
<p>See also <ahref="qmake-manual-8.html#Extensions">File Extensions</a>.</p>
<p>See also <ahref="tqmake-manual-8.html#Extensions">File Extensions</a>.</p>
<h5><aname="4-2-114"></a>YACCIMPLS</h5>
<p>This variable contains a list of yacc source files. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains a list of yacc source files. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<h5><aname="4-2-115"></a>YACCOBJECTS</h5>
<p>This variable contains a list of yacc object files. The value of this variable is typically handled by <em>qmake</em> or <ahref="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<p>This variable contains a list of yacc object files. The value of this variable is typically handled by <em>tqmake</em> or <ahref="tqmake-manual-8.html#QMAKESPEC">tqmake.conf</a> and rarely needs to be modified.</p>
<p><em>qmake</em> recognizes the following functions:</p>
<p><em>tqmake</em> recognizes the following functions:</p>
<h4><aname="5-1"></a>include( filename )</h4>
<p>This function will include the contents of <em>filename</em> into the current project at the point where was included. The function succeeds if <em>filename</em> was included, otherwise it fails. You can check the return value of this function using a scope.</p>
<p>For example:</p>
@ -593,7 +593,7 @@ count( MYVAR, 3 ) {
}
</pre>
<h4><aname="5-5"></a>infile( filename, var, val )</h4>
<p>This function will succeed if the file <em>filename</em> (when parsed by qmake itself) contains the variable <em>var</em> with a value of <em>val</em>. You may also not pass in a third argument (<em>val</em>) and the function will only test if <em>var</em> has been assigned to in the file.</p>
<p>This function will succeed if the file <em>filename</em> (when parsed by tqmake itself) contains the variable <em>var</em> with a value of <em>val</em>. You may also not pass in a third argument (<em>val</em>) and the function will only test if <em>var</em> has been assigned to in the file.</p>
<h4><aname="5-6"></a>isEmpty( variablename )</h4>
<p>This function will succeed if the variable <em>variablename</em> is empty (same as <tt>count(variable, 0)</tt>).</p>
<h4><aname="5-7"></a>system( command )</h4>
@ -605,87 +605,87 @@ count( MYVAR, 3 ) {
<h4><aname="5-8"></a>message( string )</h4>
<p>This function will always succeed, and will display the given <em>string</em> to the user.</p>
<h4><aname="5-9"></a>error( string )</h4>
<p>This function will never return a value. It will display the given <em>string</em> to the user, and then exit <em>qmake</em>. This function should only be used for very fatal configurations.</p>
<p>This function will never return a value. It will display the given <em>string</em> to the user, and then exit <em>tqmake</em>. This function should only be used for very fatal configurations.</p>
<p>For example:</p>
<pre>
release:debug:error(You can't have release and debug at the same time!)
<p><em>qmake</em> has a system of persistant information, this allows you to 'set' a variable in qmake once, and each time qmake is invoked this value can be queried. Use the following to set a property in qmake:</p>
<p><em>tqmake</em> has a system of persistant information, this allows you to 'set' a variable in tqmake once, and each time tqmake is invoked this value can be queried. Use the following to set a property in tqmake:</p>
<pre>
qmake -set VARIABLE VALUE
tqmake -set VARIABLE VALUE
</pre>
<p>To retrieve this information back from qmake you can do:</p>
<p>To retrieve this information back from tqmake you can do:</p>
<pre>
qmake -query VARIABLE
qmake -query #queries all current VARIABLE/VALUE pairs..
tqmake -query VARIABLE
tqmake -query #queries all current VARIABLE/VALUE pairs..
</pre>
<p>This information will be saved into a TQSettings object (meaning it will be stored in different places for different platforms). As VARIABLE is versioned as well, you can set one value in an older version of qmake, and newer versions will retrieve this value, however if you -set VARIABLE into a newer version of qmake the older version will not use this value. You can however query a specific version of a variable if you prefix that version of qmake to VARIABLE, as in:</p>
<p>This information will be saved into a TQSettings object (meaning it will be stored in different places for different platforms). As VARIABLE is versioned as well, you can set one value in an older version of tqmake, and newer versions will retrieve this value, however if you -set VARIABLE into a newer version of tqmake the older version will not use this value. You can however query a specific version of a variable if you prefix that version of tqmake to VARIABLE, as in:</p>
<pre>
qmake -query "1.06a/VARIABLE"
tqmake -query "1.06a/VARIABLE"
</pre>
<p>qmake also has the notion of 'builtin' properties, for example you can query the installation of TQt for this version of qmake with the QT_INSTALL_PREFIX property:</p>
<p>tqmake also has the notion of 'builtin' properties, for example you can query the installation of TQt for this version of tqmake with the QT_INSTALL_PREFIX property:</p>
<pre>
qmake -query "QT_INSTALL_PREFIX"
tqmake -query "QT_INSTALL_PREFIX"
</pre>
<p>These builtin properties cannot have a version prefixed to them as they are not versioned and each qmake will have its own notion of these values. The list below outlines the builtin properties:</p>
<ul><li><p>QT_INSTALL_PREFIX - Where the version of TQt this qmake is built for resides</p>
<p>These builtin properties cannot have a version prefixed to them as they are not versioned and each tqmake will have its own notion of these values. The list below outlines the builtin properties:</p>
<ul><li><p>QT_INSTALL_PREFIX - Where the version of TQt this tqmake is built for resides</p>
<li><p>QT_INSTALL_DATA - Where data for this version of TQt resides</p>
<li><p>QMAKE_VERSION - The current version of qmake</p>
<li><p>QMAKE_VERSION - The current version of tqmake</p>
</ul><p>Finally, these values can be queried in a project file with a special notation such as:</p>
<pre>
QMAKE_VERS = $$[QMAKE_VERSION]
</pre>
<aname="Environment"></a><h3><aname="7"></a>Environment Variables and Configuration</h3>
<p><em>qmake</em> requires a platform and compiler description file which contains many default values used to generate appropriate makefiles. The standard TQt distribution comes with many of these files, located in the 'mkspecs' subdirectory of the TQt installation.</p>
<p><em>tqmake</em> requires a platform and compiler description file which contains many default values used to generate appropriate makefiles. The standard TQt distribution comes with many of these files, located in the 'mkspecs' subdirectory of the TQt installation.</p>
<p>The QMAKESPEC environment variable can contain any of the following:</p>
<ul><li><p>A complete path to a directory containing a qmake.conf file. In this case <em>qmake</em> will open the qmake.conf file from within that directory. If the file does not exist, <em>qmake</em> will exit with an error.</p>
<li><p>The name of a platform-compiler combination. In this case, <em>qmake</em> will search in the directory specified by the TQTDIR environment variable.</p>
</ul><p>Note: the QMAKESPEC path will automatically be added to the <ahref="qmake-manual-8.html#INCLUDEPATH">INCLUDEPATH</a> system variable.</p>
<ul><li><p>A complete path to a directory containing a tqmake.conf file. In this case <em>tqmake</em> will open the tqmake.conf file from within that directory. If the file does not exist, <em>tqmake</em> will exit with an error.</p>
<li><p>The name of a platform-compiler combination. In this case, <em>tqmake</em> will search in the directory specified by the TQTDIR environment variable.</p>
</ul><p>Note: the QMAKESPEC path will automatically be added to the <ahref="tqmake-manual-8.html#INCLUDEPATH">INCLUDEPATH</a> system variable.</p>
<p>It is common on UNIX to be able to install from the same utility as you build with (e.g make install). For this <em>qmake</em> has introduce the concept of an install set. The notation for this is quite simple, first you fill in an "object" in qmake for example:</p>
<p>It is common on UNIX to be able to install from the same utility as you build with (e.g make install). For this <em>tqmake</em> has introduce the concept of an install set. The notation for this is quite simple, first you fill in an "object" in tqmake for example:</p>
<pre>
documentation.path = /usr/local/program/doc
documentation.files = docs/*
</pre>
<p>In this way you are telling <em>qmake</em> several things about this install, first that you plan to install to /usr/local/program/doc (the path member), second that you plan to copy everything in the docs directory. Once this is done you may insert it in the install list:</p>
<p>In this way you are telling <em>tqmake</em> several things about this install, first that you plan to install to /usr/local/program/doc (the path member), second that you plan to copy everything in the docs directory. Once this is done you may insert it in the install list:</p>
<pre>
INSTALLS += documentation
</pre>
<p>Now <em>qmake</em> will take over making sure the correct things are copied to the specified places. If however you require greater control you may use the 'extra' member of the object:</p>
<p>Now <em>tqmake</em> will take over making sure the correct things are copied to the specified places. If however you require greater control you may use the 'extra' member of the object:</p>
<p>Then qmake will run the things in extra (this is of course platform specific, so you may need to test for your platform first, this case we test for unix). Then it will do the normal processings of the files member. Finally if you appened a builtin install to INSTALLS <em>qmake</em> (and do not specify a files or extra member) will decide what needs to be copied for you, currently the only supported builtin is target:</p>
<p>Then tqmake will run the things in extra (this is of course platform specific, so you may need to test for your platform first, this case we test for unix). Then it will do the normal processings of the files member. Finally if you appened a builtin install to INSTALLS <em>tqmake</em> (and do not specify a files or extra member) will decide what needs to be copied for you, currently the only supported builtin is target:</p>
<pre>
target.path = /usr/local/myprogram
INSTALLS += target
</pre>
<p>With this <em>qmake</em> will know what you plan need copied, and do this for you.</p>
<p>With this <em>tqmake</em> will know what you plan need copied, and do this for you.</p>
<p>The cache file (mentioned above in the options) is a special file <em>qmake</em> will read to find settings not specified in the <tt>qmake.conf</tt> file, the .pro file, or the command line. If <tt>-nocache</tt> is not specified, <em>qmake</em> will try to find a file called <tt>.qmake.cache</tt> in parent directories. If it fails to find this file, it will silently ignore this step of processing.</p>
<p>The cache file (mentioned above in the options) is a special file <em>tqmake</em> will read to find settings not specified in the <tt>tqmake.conf</tt> file, the .pro file, or the command line. If <tt>-nocache</tt> is not specified, <em>tqmake</em> will try to find a file called <tt>.tqmake.cache</tt> in parent directories. If it fails to find this file, it will silently ignore this step of processing.</p>
<p>Often when linking against a library <em>qmake</em> relies on the underlying platform to know what other libraries this library links against, and lets the platform pull them in. In many cases, however, this is not sufficent. For example when statically linking a library there are no libraries linked against, and therefore no dependencies to those libraries are created - however an application that later links against this library will need to know where to find the symbols that the linked in library will require. To help with this situation <em>qmake</em> will follow a library's dependencies when it feels appropriate, however this behaviour must be enabled in <em>qmake</em>. To enable requires two steps. First, you must enable it in the library - to do this you must tell <em>qmake</em> to save information about this library:</p>
<p>Often when linking against a library <em>tqmake</em> relies on the underlying platform to know what other libraries this library links against, and lets the platform pull them in. In many cases, however, this is not sufficent. For example when statically linking a library there are no libraries linked against, and therefore no dependencies to those libraries are created - however an application that later links against this library will need to know where to find the symbols that the linked in library will require. To help with this situation <em>tqmake</em> will follow a library's dependencies when it feels appropriate, however this behaviour must be enabled in <em>tqmake</em>. To enable requires two steps. First, you must enable it in the library - to do this you must tell <em>tqmake</em> to save information about this library:</p>
<pre>
CONFIG += create_prl
</pre>
<p>This is only relevant to the lib template, and will be ignored for all others. When this option is enabled <em>qmake</em> will create a file (called a .prl file) which will save some meta information about the library. This metafile is itself just a qmake project file, but with all internal variables. You are free to view this file, and if deleted <em>qmake</em> will know to recreate it when necesary (either when the .pro file is later read, or if a dependent library (described below) has changed). When installing this library (by using target in INSTALLS, above) <em>qmake</em> will automatically copy the .prl file to your install path.</p>
<p>This is only relevant to the lib template, and will be ignored for all others. When this option is enabled <em>tqmake</em> will create a file (called a .prl file) which will save some meta information about the library. This metafile is itself just a tqmake project file, but with all internal variables. You are free to view this file, and if deleted <em>tqmake</em> will know to recreate it when necesary (either when the .pro file is later read, or if a dependent library (described below) has changed). When installing this library (by using target in INSTALLS, above) <em>tqmake</em> will automatically copy the .prl file to your install path.</p>
<p>The second step to enabling this processing is to turn on reading of the meta information created above:</p>
<pre>
CONFIG += link_prl
</pre>
<p>When this is turned on <em>qmake</em> will process all libraries linked to, and find their meta information. With this meta information <em>qmake</em> will figure out what is relevant to linking, specifically it will add to your list of DEFINES as well as LIBS. Once <em>qmake</em> has processed this file, it will then look through the newly introduced LIBS and find their dependent .prl files, and continue until all libraries have been resolved. At this point the makefile is created as usual, and the libraries are linked explicity against your program.</p>
<p>The internals of the .prl file are left closed so they can easily change later. It is not designed to be changed by hand however, and should only be created by <em>qmake</em> - these .prl files should also not be transfered from operating system to operating system as they may be platform dependent (like a makefile).</p>
<p>When this is turned on <em>tqmake</em> will process all libraries linked to, and find their meta information. With this meta information <em>tqmake</em> will figure out what is relevant to linking, specifically it will add to your list of DEFINES as well as LIBS. Once <em>tqmake</em> has processed this file, it will then look through the newly introduced LIBS and find their dependent .prl files, and continue until all libraries have been resolved. At this point the makefile is created as usual, and the libraries are linked explicity against your program.</p>
<p>The internals of the .prl file are left closed so they can easily change later. It is not designed to be changed by hand however, and should only be created by <em>tqmake</em> - these .prl files should also not be transfered from operating system to operating system as they may be platform dependent (like a makefile).</p>
<p>Under normal circumstances <em>qmake</em> will try to use appropriate file extensions for your platform. There may be times, however, that you would like to override the behavior of these extensions. To do this, you must modify builtin variables in your .pro file, which will in turn changes <em>qmake</em>'s interpretation of these files. You may do this as:</p>
<p>Under normal circumstances <em>tqmake</em> will try to use appropriate file extensions for your platform. There may be times, however, that you would like to override the behavior of these extensions. To do this, you must modify builtin variables in your .pro file, which will in turn changes <em>tqmake</em>'s interpretation of these files. You may do this as:</p>
<pre>
QMAKE_EXT_MOC = .mymoc
</pre>
<p>The variables are as follows:</p>
<ul><li><p>QMAKE_EXT_MOC - This modifies the extension placed on included moc files.</p>
<li><p>QMAKE_EXT_UI - This modifies the extension used for designer UI files (usually in FORMS).</p>
<li><p>QMAKE_EXT_PRL - This modifies the extension placed on <ahref="qmake-manual-8.html#LibDepend">library dependency files</a>.</p>
<li><p>QMAKE_EXT_PRL - This modifies the extension placed on <ahref="tqmake-manual-8.html#LibDepend">library dependency files</a>.</p>
<li><p>QMAKE_EXT_LEX - This changes the suffix used in files (usually in LEXSOURCES).</p>
<li><p>QMAKE_EXT_YACC - This changes the suffix used in files (usually in YACCSOURCES).</p>
<li><p>QMAKE_EXT_OBJ - This changes the suffix used on generated object files.</p>
@ -693,8 +693,8 @@ QMAKE_VERS = $$[QMAKE_VERSION]
<ul><li><p>QMAKE_EXT_CPP - Changes interpretation all files with these suffixes to be C++ source files.</p>
<li><p>QMAKE_EXT_H - Changes interpretation all files with these suffixes to be C header files.</p>
<p>qmake often tries to be all things to all build tools, this is often less than ideal when you really need to run special platform dependent commands. This can be achieved with specific instructions to the different qmake backends (currently this is only supported by the UNIX <ahref="qmake-manual-8.html#MAKEFILE_GENERATOR">generator</a>).</p>
<p>The interfaces to customizing the Makefile are done through "objects" as in other places in qmake. The notation for this is quite simple, first you fill in an "object" in qmake for example:</p>
<p>tqmake often tries to be all things to all build tools, this is often less than ideal when you really need to run special platform dependent commands. This can be achieved with specific instructions to the different tqmake backends (currently this is only supported by the UNIX <ahref="tqmake-manual-8.html#MAKEFILE_GENERATOR">generator</a>).</p>
<p>The interfaces to customizing the Makefile are done through "objects" as in other places in tqmake. The notation for this is quite simple, first you fill in an "object" in tqmake for example:</p>
mytarget2.commands = @echo Building $$mytarget.target
</pre>
<p>The information above defines a qmake target called mytarget which contains a Makefile target called .buildfile, .buildfile is generated by 'touch .buildfile', and finally that this Makefile target depends on the qmake target mytarget2. Additionally we've defined the qmake target mytarget2 which simply echo's something to stdout.</p>
<p>The final step to making use of the above is to instruct qmake that this is actually an object used by the target building parts of qmake by:</p>
<p>The information above defines a tqmake target called mytarget which contains a Makefile target called .buildfile, .buildfile is generated by 'touch .buildfile', and finally that this Makefile target depends on the tqmake target mytarget2. Additionally we've defined the tqmake target mytarget2 which simply echo's something to stdout.</p>
<p>The final step to making use of the above is to instruct tqmake that this is actually an object used by the target building parts of tqmake by:</p>
<pre>
QMAKE_EXTRA_UNIX_TARGETS += mytarget mytarget2
</pre>
<p>This is all you need to do to actually build custom targets in qmake, of course you may want to tie one of these targets to actually building the <ahref="qmake-manual-8.html#TARGET">qmake build target</a>. To do this, you simply need to include your Makefile target in the list of <ahref="qmake-manual-8.html#PRE_TARGETDEPS">PRE_TARGETDEPS</a>.</p>
<p>This is all you need to do to actually build custom targets in tqmake, of course you may want to tie one of these targets to actually building the <ahref="tqmake-manual-8.html#TARGET">tqmake build target</a>. To do this, you simply need to include your Makefile target in the list of <ahref="tqmake-manual-8.html#PRE_TARGETDEPS">PRE_TARGETDEPS</a>.</p>
<p>For convenience there is also a method of customizing (UNIX) projects for generic new compilers (or even preprocessors).</p>
<p>With this you can create a new moc for qmake, the commands will be executed over all arguments given to a NEW_HEADERS variable (from the input variable), and write to output (and automatically hand this filename to the compiler to be linked into your target). Additionally qmake will execute depends to generate dependency information and place this in the project as well.</p>
<p>With this you can create a new moc for tqmake, the commands will be executed over all arguments given to a NEW_HEADERS variable (from the input variable), and write to output (and automatically hand this filename to the compiler to be linked into your target). Additionally tqmake will execute depends to generate dependency information and place this in the project as well.</p>
<p>These commands can easily be placed into a cache file, and subsequent .pro files can give several arguments to NEW_HEADERS.</p>
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>qmake User Guide</h1>
<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>tqmake User Guide</h1>
<h2><ahref="qmake-manual-1.html">Introduction to qmake</a></h2>
@ -69,7 +69,7 @@ One TQAssistantClient instance interacts with one TQt Assistant instance, so eve
.PP
When you call openAssistant() the assistantOpened() signal is emitted. Similarly when closeAssistant() is called, assistantClosed() is emitted. In either case, if an error occurs, error() is emitted.
.PP
This class is not included in the TQt library itself. To use it you must link against \fClibtqassistantclient.a\fR (Unix) or \fCtqassistantclient.lib\fR (Windows), which is built into \fCINSTALL/lib\fR if you built the TQt tools (\fCINSTALL\fR is the directory where TQt is installed). If you use qmake, then you can simply add the following line to your pro file:
This class is not included in the TQt library itself. To use it you must link against \fClibtqassistantclient.a\fR (Unix) or \fCtqassistantclient.lib\fR (Windows), which is built into \fCINSTALL/lib\fR if you built the TQt tools (\fCINSTALL\fR is the directory where TQt is installed). If you use tqmake, then you can simply add the following line to your pro file:
"qmake couldn't create a GUID based on filepath, and we couldn't\nfind a valid GUID in the .pro file (Consider adding\n'GUID = %s' to the .pro file)\n",
"tqmake couldn't create a GUID based on filepath, and we couldn't\nfind a valid GUID in the .pro file (Consider adding\n'GUID = %s' to the .pro file)\n",