Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtqml-tooling-qmlpreview.qdoc
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5\page qtqml-tooling-qmlpreview.html
6\title qmlpreview
7\brief Overview of the qmlpreview utility.
8\ingroup qtqml-tooling
9
10\section1 The Qml Preview
11The QML Preview tool watches QML and JavaScript files on disk and updates
12the application live with any changes. The application to be previewed
13has to have QML debugging enabled. \l {details}{More...}
14
15\table
16\header
17 \li Usage
18\row
19 \li qmlpreview [\l{options}] executable [parameters...]
20\endtable
21
22\section2 options
23
24\table
25\header
26 \li Option
27 \li Description
28\row
29 \li --verbose
30 \li Print debugging output.
31\row
32 \li -h, --help
33 \li Displays help on commandline options.
34\row
35 \li --help-all
36 \li Displays help, including generic Qt options.
37\row
38 \li -v, --version
39 \li Displays version information.
40\endtable
41
42\section2 Arguments
43
44\table
45 \header
46 \li Argument
47 \li Description
48 \row
49 \li executable
50 \li The path of the executable file that loads a QML document.
51 \row
52 \li parameters
53 \li Arguments of the executable
54
55\endtable
56
57\section2 Details
58\target details
59
60\section3 Enable QML Debugging
61To enable QML debugging, make sure you build your application with appropriate
62configuration parameters. When using qmake, you should add \c {CONFIG+=qml_debug}
63in the \c {.pro} file. If you use another build system, then \c {QT_QML_DEBUG}
64variable should be defined.
65
66\badcode
67 qt_add_executable(MyApp
68 ...
69 )
70
71 target_compile_definitions(MyApp PRIVATE QT_QML_DEBUG)
72\endcode
73
74*/