Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.11.3
-
None
Description
The two macros QUICK_TEST_MAIN and QUICK_TEST_MAIN_WITH_SETUP do not let us chose between QApplication or QGuiApplication. There is no easy way to test a UI containing a chart for now.
All such QGuiApplication instances in the project must be replaced with QApplication as the module depends on Qt's Graphics View Framework for rendering.
Note : I also went through this trouble reported here : https://bugreports.qt.io/browse/QTBUG-74160
See also https://github.com/qt/qtdeclarative/blob/5.15/src/qmltest/quicktest.cpp#L370-L381
int quick_test_main_with_setup(int argc, char **argv, const char *name, const char *sourceDir, QObject *setup) { // Peek at arguments to check for '-widgets' argument #ifdef QT_QMLTEST_WITH_WIDGETS bool withWidgets = false; for (int index = 1; index < argc; ++index) { if (strcmp(argv[index], "-widgets") == 0) { withWidgets = true; break; } } #endif