diff options
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 a1997e542..9c9845df8 100644 --- a/doc/html/designer-manual-6.html +++ b/doc/html/designer-manual-6.html @@ -176,7 +176,7 @@ INCLUDEPATH += $(QTDIR)/tools/designer/uilib </pre> <p>We do <em>not</em> include the <tt>creditformbase.ui</tt> file since this file will be read at runtime, as we'll see shortly. We must include the <tt>tqui</tt> library since the functionality we retquire is not part of the standard TQt library.</p> <h4><a name="2-2"></a>Creating main.cpp</h4> -<p>The<!-- index main.cpp --> <tt>main.cpp</tt> is tquite standard. It will invoke the form we're going to create in <em>TQt Designer</em> as its main form. This form will then load and execute the dynamic dialog.</p> +<p>The<!-- index main.cpp --> <tt>main.cpp</tt> is quite standard. It will invoke the form we're going to create in <em>TQt Designer</em> as its main form. This form will then load and execute the dynamic dialog.</p> <pre> #include <<a href="qapplication-h.html">qapplication.h</a>> #include "mainform.h" @@ -194,7 +194,7 @@ INCLUDEPATH += $(QTDIR)/tools/designer/uilib <p>We create a new instance of our MainForm class, set it to be the main widget, show it and enter the event loop in the <tt>app.exec()</tt> call.</p> <h4><a name="2-3"></a>Creating the Main Form</h4> <h5><a name="2-3-1"></a>Designing the Form</h5> -<ol type=1><li><p>Open the<!-- index receiver.pro --> <tt>receiver.pro</tt> project file in <em>TQt Designer</em>. We'll create a dialog as our main window which we'll use to invoke the dynamic dialog. Press <b>Ctrl+N</b> to launch the <em>New File</em> dialog and click <b>OK</b> to get the default which is a dialog. Change the dialog's name to 'MainForm' and its caption to 'Main Form'. Add two buttons, one called 'creditPushButton' with the text '&Credit Dialog', and the other called 'tquitPushButton' with the text '&Quit'. (For each button click the <b>Push Button</b> toolbar button, then click the form. Change the properties in the property window to those we've just described.)</p> +<ol type=1><li><p>Open the<!-- index receiver.pro --> <tt>receiver.pro</tt> project file in <em>TQt Designer</em>. We'll create a dialog as our main window which we'll use to invoke the dynamic dialog. Press <b>Ctrl+N</b> to launch the <em>New File</em> dialog and click <b>OK</b> to get the default which is a dialog. Change the dialog's name to 'MainForm' and its caption to 'Main Form'. Add two buttons, one called 'creditPushButton' with the text '&Credit Dialog', and the other called 'quitPushButton' with the text '&Quit'. (For each button click the <b>Push Button</b> toolbar button, then click the form. Change the properties in the property window to those we've just described.)</p> <li><p>We will now add a couple of labels so that we can show the settings the user chose in the dynamic dialog. Click the <b>Text Label</b> toolbar button, then click the form below the Credit Dialog button. Change the label's <em>text</em> to 'Credit Rating'. Add another text label below the Quit button. Change its <em>name</em> to 'ratingTextLabel' and its <em>text</em> to 'Unrated'.</p> <li><p>We'll now lay out the widgets. Click the form then press <b>Ctrl+G</b> (lay out in a grid).</p> <li><!-- index Signals and Slots!Connecting to Close a Dialog --><p>We'll now handle the signals and slots connections. Invoke the <em>View and Edit Connections</em> dialog and connect the credit dialog button's clicked() signal to a new creditDialog() custom slot (which is created by clicking the <b>Edit Slots...</b> button). Now connect the Quit button's<!-- index clicked() --> <tt>clicked()</tt> signal to the dialog's<!-- index accept() --> <tt>accept()</tt> function.</p> |