I am using Qt 5.7
& unit testing using gtest
or as its called googletests.
I have a function to test which intakes a QQuickItem
. To test this, I want to create a QQuickItem
on fly when my unit test in run. Is it possible?
Note that I do have access to QQmlApplicationEngine
or the any qml files like main.qml
. However I should be able to create a dummy.qml
in the resources of my tests project ?
I also thinking that doing a #include <QQmlApplicationEngine>
should give me access to QQmlApplicationEngine
?
How do I create dummy QQuickItem
in C++ code with some valid width & height in my unit test, & pass it to my method at runtime?