官术网_书友最值得收藏!

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:

  1. 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.
  2. 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.
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.

主站蜘蛛池模板: 大方县| 寻乌县| 瑞昌市| 通道| 安仁县| 建德市| 古浪县| 额济纳旗| 娄烦县| 台州市| 赞皇县| 广元市| 汉沽区| 武义县| 鹰潭市| 泗水县| 淮滨县| 修文县| 宜君县| 镇赉县| 兴安盟| 和顺县| 泾源县| 萨迦县| 华亭县| 云安县| 枣阳市| 玉环县| 庄河市| 高邑县| 阿尔山市| 吉林省| 松溪县| 香河县| 安龙县| 德阳市| 丹阳市| 鸡泽县| 金寨县| 孝昌县| 赣州市|