iOS 风格
iOS 风格是一种基于图像资源、具有原生外观的 iOS 风格。更多...
| 导入语句: | import QtQuick.Controls.iOS |
| 自: | Qt 6.4 |
详细说明
iOS 样式旨在尽可能在视觉和操作体验上与 UIKit 中的原生控件保持一致。大多数控件利用9-patch 图像来绘制其组件,以便适应不同尺寸的控件。 对于在 UIKit 中没有原生对应控件的情况,iOS 样式会根据iOS《人机界面指南 》中的颜色和样式规范提供自定义外观。 iOS 样式并非原生 iOS 样式,因此可在 iOS 以外的平台运行。 不过,目前该样式仅适用于在 macOS 和 iOS 上运行的应用程序,且在两个平台上的外观应保持一致,仅可能因可用系统字体和字体渲染引擎的差异而存在细微差别。
iOS 样式的浅色主题。 |
iOS 风格的深色主题。 |
若要运行采用 iOS 样式的应用程序,请参阅《Qt Quick Controls 》中的“使用样式”部分。
当前状态
Tumbler 控件尚未实现 iOS 样式,将回退至使用“基本样式”。
自定义
调色板
iOS 样式支持通过palette 属性以及qtquickcontrols2.conf文件对配色方案进行自定义。 与其他样式一样,iOS 样式所使用的具体palette roles 取决于样式本身。不过,由于控件的大部分视觉外观(例如:背景)是通过图像资源管理的,因此通常只有用于文本的角色才会产生影响。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

