diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-10-24 11:19:22 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2018-11-07 08:48:40 +0000 |
commit | 1d024222d8d57ffa03050a177409be6a8ebb73e1 (patch) | |
tree | 58e89079ae05c341412682e051a87fa8c9e34eb9 /src/qmltest/doc/src/qtquicktest-index.qdoc | |
parent | 900786226404c915f3b2eb2840a1f3eb391db69b (diff) |
QUICK_TEST_MAIN_WITH_SETUP: improve documentation
- Explain how the moc include works.
- Add missing Q_OBJECT macro to example.
Change-Id: I2bacdc45721bb6022f030ff4bc89c95132e35e60
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/qmltest/doc/src/qtquicktest-index.qdoc')
-rw-r--r-- | src/qmltest/doc/src/qtquicktest-index.qdoc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qmltest/doc/src/qtquicktest-index.qdoc b/src/qmltest/doc/src/qtquicktest-index.qdoc index 0a89066d47..15ea33d06a 100644 --- a/src/qmltest/doc/src/qtquicktest-index.qdoc +++ b/src/qmltest/doc/src/qtquicktest-index.qdoc @@ -181,6 +181,8 @@ class Setup : public QObject { + Q_OBJECT + public: Setup() {} @@ -196,6 +198,15 @@ #include "tst_mytest.moc" \endcode + The \c .moc include is based on the file name of the \c .cpp file. + For example, in the example above, the \c .cpp file is named + \c tst_mytest.cpp. If the file was named \c MyTest.cpp, the include would + be: + + \code + #include "MyTest.moc" + \endcode + \section1 Licenses Qt Quick Tests is available under commercial licenses from \l{The Qt Company}. |