[Qt-creator] Testing of own plugin

Knut Petter Svendsen knutpett+qtcreator at pvv.org
Wed Jan 25 16:11:16 CET 2023


> I've added a few dummy tests to my example dummy plugin, as a reference
> for (one way of solving) the details, that uses the fact that
> add_qtc_plugin etc does some helpful things when WITH_TESTS is set:
>
> https://github.com/e4z9/qtcreator-testplugin/commit/fa8065f580ee5724f8b9afb06e904e1be1c2e343

Nice :)

Could you improve the example so tst_mytest.cpp uses (includes, compiles &
links) some of the code (a class?) in the plugin? I tried with

#include <qtcreatortestplugin.h>

but that didn't compile? Am I missing something in CMakeLists.txt?

Knut



More information about the Qt-creator mailing list