aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/tools/qtqml-tooling-qmlpreview.qdoc
blob: 5e9da3d2f40774b52b0f2f16593f1e756db11f1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
\page qtqml-tooling-qmlpreview.html
\title qmlpreview
\brief Overview of the qmlpreview utility.
\ingroup qtqml-tooling

\section1 The Qml Preview
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. \l {details}{More...}

\table
\header
    \li Usage
\row
    \li qmlpreview [\l{options}] executable [parameters...]
\endtable

\section2 options

\table
\header
    \li Option
    \li Description
\row
    \li   --verbose
    \li Print debugging output.
\row
    \li -h, --help
    \li Displays help on commandline options.
\row
    \li --help-all
    \li Displays help, including generic Qt options.
\row
    \li -v, --version
    \li Displays version information.
\endtable

\section2 Arguments

\table
    \header
        \li Argument
        \li Description
    \row
        \li executable
        \li The path of the executable file that loads a QML document.
    \row
        \li parameters
        \li Arguments of the executable

\endtable

\section2 Details
\target details

\section3 Enable QML Debugging
To enable QML debugging, make sure you build your application with appropriate
configuration parameters. When using qmake, you should add \c {CONFIG+=qml_debug}
in the \c {.pro} file. If you use another build system, then \c {QT_QML_DEBUG}
variable should be defined.

\badcode
    qt_add_executable(MyApp
    ...
    )

    target_compile_definitions(MyApp PRIVATE QT_QML_DEBUG)
\endcode

*/