Controls 1 组件
Qt Quick Controls
从Qt5.1开始引入,且从Qt5.12开始分开成为独立的Qt Quick Controls 1
-
ApplicationWindow
- 组件类属性:
menuBar
、toolBar
、statusBar
、style
; - 一个完整的主应用窗口包含菜单栏、工具栏、内容显示区、状态栏等UI组件;
- 组件类属性:
-
style
样式属性:-
自Qt5.1起,引入了一个
Qt Quick Controls Styles
的子模块,它几乎为每个Qt Quick控件都提供了一个样式类,在Qt Quick Controls 2
是没有的; -
凡是对应有样式元素的Qt Quick控件都可以由用户自定义其外观,定制控件的样式有以下两种方法:
-
使用控件的样式属性:
style
-
如果某个控件
Xxxx
有style
属性,则对应的样式属性元素为XxxxStyle
。例如: -
import QtQuick.Controls.Styles 1.4 ApplicationWindow { style: ApplicationWindowStyle { background: BorderImage { source: "background.png" border { left: 20; top: 20; right: 20; bottom<
-
-
-