designer-manual-12.html
来自「QT 下载资料仅供参考」· HTML 代码 · 共 416 行 · 第 1/5 页
HTML
416 行
</p><blockquote><p align="center"><em>Project Settings- Files Tab</em></p></blockquote><h5><a name="4-4-2"></a>Files Tab</h5><p>Click the 'Files' tab to enter a name in the 'Database File' line edit. Click the <b>(ellipsis)</b> button to invoke the <em>Save As Dialog</em>.</p><p align="center"><img align="middle" src="qd-projectsettingsc++tabdialog.png" width="459" height="335"></p><blockquote><p align="center"><em>Project Settings- C++ Tab</em></p></blockquote><h5><a name="4-4-3"></a>C++ Tab</h5><p>Click the C++ Tab to change the <tt>qmake</tt> options. See the <a href="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>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><a name="5"></a>The Search Dialogs</h3><p align="center"><img align="middle" src="qd-searchfindtextdialog.png" width="303" height="223"></p><blockquote><p align="center"><em>Find Text</em></p></blockquote><a name="dialog-find-text"></a><h4><a name="5-1"></a>Find Text Dialog</h4><p>Click <b>Search|Find</b> (or press <b>Ctrl+F</b>) to invoke the <a href="designer-manual-12.html#5-1">Find Text Dialog</a>. Use this dialog to find specific text in a project file.</p><p>To find the text you want in a file, type the text in the 'Find' combobox. You can make the search more specific by checking any or all of the checkboxes in the 'Options' section. Click the 'Whole words only' checkbox to narrow the search to whole words. Click 'Case Sensitive' to search for text that is identical to the text typed in the combobox. Click 'Start at Beginning' to start the search from the beginning of the file. The 'Direction' section offers the 'Forward' radio button and the 'Backward' radio button to specify the direction to perform the search in the file. Click the <b>Find</b> button to start the search. When the text is found, it is highlighted in the file. Continue clicking <b>Find</b> to search for subsequent occurrences of the search text.</p><p>Click the <b>Close</b> button to leave the dialog.</p><p align="center"><img align="middle" src="qd-searchreplacetext.png" width="303" height="253"></p><blockquote><p align="center"><em>Replace Text</em></p></blockquote><a name="dialog-replace-text"></a><h4><a name="5-2"></a>Replace Text Dialog</h4><p>Click <b>Search|Replace</b> (or press <b>Ctrl+R</b>) to invoke the <em>Replace Text Dialog</em>. Use this dialog to replace text in a project file.</p><p>To replace text, type the text you would like to replace in the 'Find' combobox. Type the new text in the 'Replace' combobox. You can make the search more specific by checking any or all of the checkboxes in the 'Options' section. Click the 'Whole words only' checkbox to narrow the search to whole words. Click 'Case Sensitive' to search for text that identical to the text you typed in the combobox. Click 'Start at Beginning' to start the search from the beginning of the file. The 'Direction' section offers the 'Forward' radio button and the 'Backward' radio button to specify the direction to perform the search in the file.</p><p>Click the <b>Replace</b> button to search and replace the text. When the text is found, it is highlighted in the file. Continue clicking <b>Replace</b> button to search and replace each occurrence of the text in the file. Click <b>Replace All</b> button to replace all occurences of the search text in the file at once.</p><p>Click the <b>Close</b> button to leave the dialog.</p><p align="center"><img align="middle" src="qd-searchgotoline.png" width="251" height="111"></p><blockquote><p align="center"><em>Goto Line</em></p></blockquote><a name="dialog-go-to-line"></a><h4><a name="5-3"></a>Goto Line Dialog</h4><p>Click <b>Search|Goto line</b> (or press <b>Alt+G</b>) to invoke the <em>Goto Line Dialog</em>. Use this dialog to go to a specific line in the file.</p><p>To choose a line number, type the number in the 'Line' spinbox, or click the up and down arrows in the spinbox. Click the <b>Goto</b> button. The cursor is placed at the beginning of the line in the file.</p><p>Click the <b>Close</b> button to leave the dialog.</p><h3><a name="6"></a>The Help Dialogs</h3><a name="dialog-qt-designer"></a><h4><a name="6-1"></a>Qt Designer Dialog</h4><p>Click <b>Help|About...</b> to invoke the <em>Qt Designer Dialog</em>. This dialog provides information about <em>Qt Designer</em> such as the version, the licensing terms, conditions, and disclaimers.</p><p>Click the 'x' located at the top right corner of the dialog to close the dialog.</p><a name="dialog-qt-designer"></a><h4><a name="6-2"></a>Qt Designer Dialog</h4><p>Click <b>Help|About Qt...</b> to invoke the <em>Qt Designer Dialog</em>. This dialog provides information about Qt.</p><p>Click the 'x' located at the title of the dialog to close the dialog.</p><p align="center"><img align="middle" src="qd-configmainfile.png" width="316" height="309"></p><blockquote><p align="center"><em>Configure Main-File Dialog</em></p></blockquote><a name="dialog-configure-main-file"></a><h3><a name="7"></a>Configure Main-File Dialog</h3><p>Click <b>File|New|C++ Main-File</b> to invoke the <em>Configure Main-File</em> dialog. Use this dialog to configure the main file and its forms.</p><p>To change the default file name, type it in the 'Filename' line edit. Choose the form to use as the application's main form from the line edit by clicking it.</p><p>Click <b>OK</b> to accept the configurations and <em>Qt Designer</em> will create a default <tt>main.cpp</tt> file. Click <b>Cancel</b> to leave the dialog.</p><p>Note for database programmers: If you create a <tt>main.cpp</tt> file using <em>Qt Designer</em>, this file will <em>not</em> include the <tt>createConnections()</tt> function. We do not include this function because it needs the username and password for the database connection, and you may prefer to handle these differently from our simple example function. As a result, applications that preview correctly in <em>Qt Designer</em> will not run unless you implement your own database connections function.</p><p align="center"><img align="middle" src="qd-filesaveprojectsettingsdialog.png" width="461" height="126"></p><blockquote><p align="center"><em>Save Project Settings</em></p></blockquote><a name="dialog-save-project-settings"></a><h3><a name="8"></a>Save Project Settings Dialog</h3><p>The <em>Save Project Settings</em> message box is invoked by clicking <b>File|Close</b> or <b>File|Exit</b> for an open project with unsaved changes. The dialog displays the text 'Save changes to your project.pro'?. Click <b>Yes</b> to save the changes. If the project has any forms with unsaved changes, the <em>Save Form As</em> dialog is invoked when you click <b>Yes</b>. Click <b>No</b> to close the project without saving any changes. Click <b>Cancel</b> to leave the dialog without closing the project and without making any changes.</p><p align="center"><img align="middle" src="qd-filesaveformdialog.png" width="346" height="126"></p><blockquote><p align="center"><em>Save Form</em></p></blockquote><a name="dialog-save-form"></a><h3><a name="9"></a>Save Form Dialog</h3><p>The <em>Save Form</em> message is invoked in several ways. One way is to click <b>File|Close</b> for a form that has never been saved, or has been saved previously but has had changes made to it. The dialog is also invoked by clicking <b>File|Exit</b> for a form that has never been saved, or has been saved previously but has had changes made to it. The dialog displays 'Save Changes to the Form?'. Click <b>Yes</b> to save the form. If the form has not been previously saved, the <em>Save Form As Dialog</em> is invoked. Click <b>No</b> to close the form without saving any changes or without saving the form if it has not been saved previously. Click <b>Cancel</b> to leave the dialog without closing or exiting the form and without saving the form.</p><p align="center"><img align="middle" src="qd-filesaveformasdialog.png" width="597" height="367"></p><blockquote><p align="center"><em>Save Form As Dialog</em></p></blockquote><a name="dialog-save-form-as"></a><h3><a name="10"></a>Save Form As Dialog</h3><p>The <em>Save Form As</em> dialog is invoked in three different ways. One way is to click <b>File|Save</b> for a form in a project that has never saved. Another way to invoke the dialog is by clicking <b>File|Close</b> for a form that has not been previously saved and has had changes made to it. The third way to invoke the dialog is by clicking <b>File|Exit</b> for a form that has not been saved previously or that has been saved but has had changes made to it. <b>File|Close</b> and <b>File|Exit</b> invoke the <em>Save Form Dialog</em>. Click <b>Yes</b> to invoke the <em>Save Form As</em> dialog.</p><p>The <em>Save Form As</em> dialog shows the current directory and the default file type. To choose a different directory, click the 'Look In' combobox. Choose a file and the name will appear in the 'File Name' combobox. To choose a different file type, click the 'File Type'combobox. Click the 'Create New Folder' toolbar button to create a new directory. Click the 'List View' toolbar button to view folders and files in a list with only the names showing. Click the 'Details' toolbar button to view the folders and file names along with their size, type, date, and attributes. Click the Size, Type, Date, or Attributes column headers to sort the folders or files.</p><p>Click <b>Save</b> to save the selected form. Click <b>Cancel</b> to leave the dialog without saving the form.</p><p align="center"><img align="middle" src="qd-editeditconnections.png" width="663" height="463"></p><blockquote><p align="center"><em>Edit Connections</em></p></blockquote><a name="dialog-edit-connections"></a><h3><a name="11"></a>Edit Connections Dialog</h3><p>Invoke the <em>Edit Connections</em> dialog to modify connections between signals and slots.</p><p>The top left hand listbox displays the Signals that the widget can emit. The top right combobox lists the form and its widgets. Beneath the combobox is the 'Slots' listbox which shows the slots available in the form or widget displayed in the 'Slots' combobox which are compatible with the highlighted signal. To connect a signal to a slot, choose a signal from the 'Signals' listbox by clicking on it. Then choose a form or widget from the 'Slots' combobox. Choose a slot for the widget or form you select from the listbox. The <b>Connect</b> button will flash and the new connection will appear in the 'Connections' listbox, along with any existing connections. Click the column headers Sender, Signal, Receiver, or Slot to sort the connections. To disconnect an existing connection, choose the connection from the 'Connections' listbox and click the <b>Disconnect</b> button. Click <b>Edit Slots</b> to invoke the <em>Edit Slots Dialog</em>.</p><p>Click <b>OK</b> to accept changes to the connections. Click <b>Cancel</b> to leave the dialog without making changes to the connections.</p><p align="center"><img align="middle" src="qd-finddirectorydialog.png" width="597" height="367"></p><blockquote><p align="center"><em>Find Directory</em></p></blockquote><a name="dialog-find-directory"></a><h3><a name="12"></a>Find Directory Dialog</h3><p>Invoke this dialog to locate a directory.</p><p>The <em>Find Directory</em> dialog shows the current directory and the default file type. To choose a different directory, click the 'Look In' combobox. Choose a file and the name will appear in the 'File Name' combobox. To choose a different file type, click the 'File Type' combobox. Click the 'Create New Folder' toolbar button to create a new directory. Click the 'List View' toolbar button to view folders and files in a list with only the names showing. Click the 'Details' toolbar button to view the folders and file names along with their size, type, date, and attributes. Click the Size, Type, Date, or Attributes column headers to sort the folders or files.</p><p>Click <b>OK</b> to accept the directory. Click <b>Cancel</b> to leave the dialog without choosing a directory.</p><p align="center"><img align="middle" src="qd-chooseapixmap.png" width="597" height="367"></p><blockquote><p align="center"><em>Choose a Pixmap</em></p></blockquote><a name="dialog-choose-a-pixmap"></a><h3><a name="13"></a>Choose a Pixmap Dialog</h3><p>Invoke this dialog to select a pixmap to use in the current project.</p>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?