- Qt5 C++ GUI Programming Cookbook
- Lee Zhi Eng
- 498字
- 2021-07-02 12:17:52
How it works...
Let's take a bit of time to get familiar with Qt Designer's interface before we start learning how to design our own UI:

The explanation for the preceding screenshot is as follows:
- Menu bar: The menu bar houses application-specific menus that provide easy access to essential functions such as creating new projects, saving files, undoing, redoing, copying, and pasting. It also allows you to access development tools that come with Qt Creator, such as the compiler, debugger, and profiler.
- Widget Box: This is where you can find all the different types of widget provided by Qt Designer. You can add a widget to your program's UI by clicking one of the widgets from the Widget Box and dragging it to the form editor.
- Mode selector: The mode selector is a side panel that places shortcut buttons for easy access to different tools. You can quickly switch between the script editor and form editor by clicking the Edit or Design buttons on the mode selector panel, which is very useful for multitasking. You can also easily navigate to the debugger and profiler tools in the same speed and manner.
- Build shortcuts: The build shortcuts are located at the bottom of the mode selector panel. You can build, run, and debug your project easily by pressing the shortcut buttons here.
- Form editor: The form editor is where you edit your program's UI. You can add different widgets to your program by selecting a widget from the Widget Box and dragging it to the form editor.
- Form toolbar: From here, you can quickly select a different form to edit. Click the drop-down box located on top of the Widget Box and select the file you want to open with Qt Designer. Beside the drop-down box are buttons to switch between the different modes of the form editor, and also buttons to change the layout of your UI.
- Object Inspector: The Object Inspector lists all the widgets within your current .ui file. All the widgets are arranged according to their parent-child relationship in the hierarchy. You can select a widget from the Object Inspector to display its properties in the Property Editor.
- Property Editor: The Property Editor will display all the properties of the widget you selected from either the Object Inspector window or the form editor window.
- Action Editor and the Signals & Slots Editor: This window contains two editors, the Action Editor and the Signals & Slots Editor, which can be accessed from the tabs beneath the window. The Action Editor is where you create actions that can be added to a menu bar or toolbar in your program's UI.
- Output panes: Output panes consist of several different windows that display information and output messages related to script compilation and debugging. You can switch between different output panes by pressing the buttons that carry a number before them, such as 1 Issues, 2 Search Results, or 3 Application Output.
推薦閱讀
- Microsoft Dynamics 365 Business Central Cookbook
- 腎病綜合征
- 陳衛(wèi)川中回醫(yī)臨證實(shí)錄方
- 寬體探測(cè)器CT臨床應(yīng)用
- 癌癥療愈錄:腫瘤門(mén)診敘事紀(jì)實(shí)
- 醫(yī)院消毒:消毒工作的重中之重
- 眼睛健康,自己查(第二版)
- 腫瘤內(nèi)科醫(yī)師查房手冊(cè)(第2版)
- 眼表活體共聚焦顯微鏡圖譜
- 意識(shí)障礙康復(fù)評(píng)定與治療學(xué)
- 醫(yī)療損害判例評(píng)析
- 慢性意識(shí)障礙
- 帕金森病中西醫(yī)結(jié)合診療與康復(fù)
- 向陽(yáng)而生:柱子哥的抗癌指南
- 深呼吸:菠蘿解密肺癌