Qt Quick Test C++ API

为测试提供宏和函数。 更多...

名称空间

QQuickTest

包含 Qt Quick Test 相关的所有函数和宏

详细描述

The C++ macros and functions can be included into your application using the following include statement:

#include <QtQuickTest>
					

There are two ways to link against the corresponding C++ library. If your test project uses a QML TestCase , you should already have the following line in your project file:

CONFIG += qmltestcase
					

This will cause the test to link to the C++ QtQuickTest library.

If you have a C++-only test project, you can add the following line to your project file:

QT += qmltest
					

另请参阅 在 QML 测试之前执行 C++ .