在本页中

Qt Quick 控件 - 附加样式属性示例

演示如何使用QQuickAttachedPropertyPropagator

带工具栏的窗口,包含暗模式切换和按钮

附加样式属性示例是一个简单的应用程序,展示了如何使用QQuickAttachedPropertyPropagator 将附加属性值传播给子对象。

运行示例

要从 Qt Creator打开Welcome 模式,然后从Examples 中选择示例。有关详细信息,请参阅Qt Creator: 教程:构建并运行

示例项目 @ code.qt.io

© 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.