qml

qml 实用工具

The qml 实用工具可加载 QML 文档,并在 QML 文档包含可视项目时创建一个窗口来显示场景。您还可以用它评估非视觉 QML 文档。它主要用于快速测试 QML 应用程序或组件,如此处所述。

使用方法
qml[options] files...[- args...]

选项

选项说明
-h, -help显示命令行选项的帮助。
-help-all显示包括通用 Qt 选项在内的帮助。
-v, -version显示版本信息。
-a, -apptype <core|gui|widget> 显示版本信息。选择要使用的应用程序类。默认为 gui。
-I <path在导入路径前添加指定路径。
-f <文件将给定文件加载为 QML 文件。
-c, -config <file> 配置文件加载给定的内置配置或配置文件。
-list-conf列出内置配置。
-translation <file加载指定文件作为翻译文件。
-dummy-data <文件从指定目录加载 QML 文件作为上下文属性。(已废弃)
-desktop强制使用桌面 OpenGL (AA_UseDesktopOpenGL)。
-gles强制使用 GLES(AA_UseOpenGLES)。
-软件强制使用软件渲染 (AA_UseSoftwareOpenGL)。
-核心配置文件强制使用 OpenGL 核心配置文件。
-disable-context-sharing(禁用上下文共享禁止在QtQuick Windows 中使用共享 GL 上下文。
-启用着色器缓存启用生成着色器的持久缓存
-透明请求一个 alpha 通道,以启用半透明窗口。
-多采样请求 4 倍多采样抗锯齿。
-安静抑制所有输出。
-verbose(详细打印 qml 正在执行的操作信息,如正在加载的特定文件 URL。
-慢动作以慢动作运行所有动画。
-固定动画根据动画时间而不是墙时间运行动画。
-r, -rhi <后端设置 Qt 图形抽象(RHI)的后端。后端可选:默认、vulkan、metal、d3d11、gl
-S <选择器向 QQmlFileSelector 列表中添加选择器。

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