Qt Quick Controls - 图库
控件图库
欢迎屏幕 |
侧抽屉 |
选项菜单 |
图库示例是一个简单的应用程序,其抽屉菜单包含所有 Qt Quick Controls.每个菜单项都会打开一个页面,显示控件的图形外观,允许您与控件进行交互,并说明在哪些情况下使用该控件比较方便。
当应用程序处于纵向模式时,抽屉是一个交互式侧面板,可以从左侧边缘轻扫打开。它出现在内容的顶部,通过模式背景阻止用户交互。当应用程序处于横向模式时,抽屉和内容并排显示。
应用程序的当前方向是通过比较窗口的宽度和高度以及设置中的方向模式配置来确定的:
readonly property bool portraitMode: !orientationCheckBox.checked || window.width < window.height
本示例支持所有内置Qt Quick Controls 样式,因此使用了运行时样式选择功能。
运行示例
要从 Qt Creator,打开Welcome 模式,并从Examples 中选择示例。更多信息,请参阅Qt Creator: 教程:构建并运行。
© 2025 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.