diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-10-06 17:29:49 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-10-06 17:29:49 +0900 |
commit | 587657561bb870d457a188a80bc0ce918ef5a0bd (patch) | |
tree | baed0c3b38c4d11389c96c686967160a1b3027cd /doc/html/designer-manual-6.html | |
parent | 4161606c301841f973f0319f46e6853c4a3fe906 (diff) | |
download | tqt3-587657561bb870d457a188a80bc0ce918ef5a0bd.tar.gz tqt3-587657561bb870d457a188a80bc0ce918ef5a0bd.zip |
Rename moc to tqmoc
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/designer-manual-6.html')
-rw-r--r-- | doc/html/designer-manual-6.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/html/designer-manual-6.html b/doc/html/designer-manual-6.html index cbe5af6f1..efb9b3536 100644 --- a/doc/html/designer-manual-6.html +++ b/doc/html/designer-manual-6.html @@ -35,13 +35,13 @@ body { background: #ffffff; color: black; } <h3><a name="1"></a>Subclassing</h3> <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 <a href="designer-manual-5.html#3">Extending the functionality of a form</a> in <a href="designer-manual-5.html#the-designer-approach">The Designer Approach</a> chapter for details.</p> <h4><a name="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>uic</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>moc</tt> (meta object compiler), and finally compiled by your compiler into a working application.</p> +<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>uic</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, Unix or Borland compilers), or <tt>nmake</tt> (Visual C++), will then call <tt>uic</tt>, <tt>moc</tt> and your compiler as necessary to build your application.</p> +<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, Unix or Borland 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> <h4><a name="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> |