Qt Quick Controls - 画廊

控件画廊。

欢迎屏幕

侧抽屉

选项菜单

画廊范例是带有抽屉菜单的简单应用程序,包含所有 Qt Quick Controls 。每个菜单项打开的页面展示控件图形外观,允许您与控件交互,和阐述在哪些情况下可顺手使用此控件。

When the application is in portrait mode, the drawer is an interactive side panel that can be swiped open from the left edge. It appears on top of the content, blocking user interaction through its modal background. When the application is in landscape mode, the drawer and the content are laid out side-by-side.

The current orientation of the application is determined by comparing the width and height of the window and orientation mode configuration in the settings:

readonly property bool portraitMode: !orientationCheckBox.checked || window.width < window.height
						

As this example supports all built-in Qt Quick Controls styles, it uses runtime style selection .

运行范例

要运行范例从 Qt Creator ,打开 Welcome 模式,然后选择范例从 Examples 。更多信息,拜访 构建和运行范例 .

范例工程 @ code.qt.io