The QML Preview tool watches QML and JavaScript files on disk and updates the application live with any changes. The application to be previewed has to have QML debugging enabled. 更多...
| 用法 |
|---|
| qmlpreview [ options ] executable [parameters...] |
| 選項 | 描述 |
|---|---|
| –verbose | Print debugging output. |
| -h, –help | 顯示命令行選項的幫助。 |
| –help-all | Displays help, including generic Qt options. |
| -v, –version | 顯示版本信息。 |
| 自變量 | 描述 |
|---|---|
| executable | The path of the executable file that loads a QML document. |
| 參數 | Arguments of the executable |
To enable QML debugging, make sure you build your application with appropriate configuration parameters. When using qmake, you should add
CONFIG+=qml_debug
在
.pro
file. If you use another build system, then
QT_QML_DEBUG
variable should be defined.
qt_add_executable(MyApp ... ) target_compile_definitions(MyApp PRIVATE QT_QML_DEBUG)