Qt6 QML Book/QtQuick控件/控件简介

Introduction to Controls

控件简介

Using Qt Quick from scratch gives you primitive graphical and interaction elements from which you can build your user interfaces. Using Qt Quick Controls you start from a slightly more structured set of controls to build from.

使用Qt Quick可以为您提供基本的图形和交互元素类型,可以从中构建用户界面。使用Qt Quick Controls,可以从一组稍微结构化的控件开始构建。

The controls range from simple text labels and buttons to more complex ones such as sliders and dials. These elements are handy if you want to create a user interface based on classic interaction patterns, as they provide a good foundation to stand on.

控件的范围从简单的文本标签和按钮到更复杂的控件,如滑块和刻度盘。如果你想创建一个基于经典交互模式的用户界面,这些元素类型很方便,因为它们提供了一个很好的基础控件。

Qt Quick Controls come with a number of styles out of the box that are shown in the table below. The Basic style is a basic flat style. The Universal style is based on the Microsoft Universal Design Guidelines, while Material is based on Google’s Material Design Guidelines, and the Fusion style is a desktop-oriented style.

Qt Quick Controls具有许多开箱即用的样式,如下表所示。基本样式是基本的平面样式。Universal 样式基于Microsoft通用设计指南,而Material 样式基于Google的材质设计指南,Fusion样式是面向桌面的样式。

Some of the styles can be tweaked by modifying palettes. The Imagine style is based on image assets, this allows a graphical designer to create a new style without writing any code at all, not even for palette colour codes.

某些样式可以通过修改调色板来调整。Imagine样式基于图像资源,这允许图形设计师创建新样式,而无需编写任何代码,甚至连调色板颜色代码也不需要。

  • Basic

  • 基本样式

  • Fusion

  • Fusion样式

  • macOS

  • macOS样式

  • Material

  • Material样式

  • Imagine

  • Imagine样式

  • Windows

  • Windows样式

  • Universal

  • Universal样式

Qt Quick Controls 2 is available from the QtQuick.Controls import. The following modules are also of interest:

Qt Quick Controls 2可从QtQuick.Controls导入。以下模块也很有趣:

  • QtQuick.Controls - The basic controls.
  • QtQuick.Controls - 基本控件。
  • QtQuick.Templates - Provides the behavioral, non-visual base types for the controls.
  • QtQuick.Templates - 为控件提供行为的、非可视的基本类型。
  • QtQuick.Controls.Imagine - Imagine style theming support.
  • QtQuick.Controls.Imagine - 图片样式主题化支持。
  • QtQuick.Controls.Material - Material style theming support.
  • QtQuick.Controls.Material - 材质样式主题化支持。
  • QtQuick.Controls.Universal - Universal style theming support.
  • QtQuick.Controls.Universal - 通用样式主题化支持。
  • Qt.labs.platform - Support for platform native dialogs for common tasks such as picking files, colours, etc, as well as system tray icons and standard paths.
  • Qt.labs.platform - 用于支持常见任务(如拾取文件、颜色等)的平台本机对话框,以及系统托盘图标和标准路径。

Qt.Labs

Notice that the Qt.labs modules are experimental, meaning that their APIs can have breaking changes between Qt versions.

请注意,Qt.labs模块是实验性的,这意味着它们的API可以在Qt版本之间有较大的变化。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值