[Development] Using QtCreator for Qt development

EXT Mitch Curtis mitch.curtis at qt.io
Mon Dec 12 11:30:30 CET 2022

> -----Original Message-----
> From: Development <development-bounces at qt-project.org> On Behalf Of
> Eike Ziller via Development
> Sent: Monday, 12 December 2022 5:20 PM
> To: Владимир Белявский <belyavskyv at gmail.com>
> Cc: development at qt-project.org
> Subject: Re: [Development] Using QtCreator for Qt development
> > Am 10/12/2022 um 13:57 schrieb Владимир Белявский
> <belyavskyv at gmail.com>:
> >
> > also view all unit tests there, debug, fix, build and run selected directly and
> so on?
> I think the only well-supported Qt configuration is with QT_BUILD_TESTS=ON
> and QT_BUILD_TESTS_BY_DEFAULT=ON. Or are there CMake variables to
> turn individual test on for the build?

Владимир, I use these configure args:


The test and example-related ones will ensure that you can build tests and examples (in Creator), but by default they won't be built, which saves a lot of time.

I use Alt+B,Alt+R ("Build for Run Configuration") to build the currently selected/active (the target that comes up when you hit Ctrl+T) test, as building the top-level qtdeclarative project won't do that with the configure args above.

> Anyway, with both on, you can just choose a test to run & debug. It looks like
> our autotest integration (the separate "Tests" panel) takes ages looking for
> tests, but running tests directly as normal run configurations works fine.

For what it's worth, I disable the AutoTest plugin, and use application arguments to run specific test(s) instead.

> Qt also has some mechanism for opening tests as separate CMake projects,
> but I don't know how that works.
> Br, Eike
> --
> Eike Ziller
> Principal Software Engineer
> The Qt Company GmbH
> Erich-Thilo-Straße 10
> D-12489 Berlin
> eike.ziller at qt.io
> http://qt.io
> Geschäftsführer: Mika Pälsi,
> Juha Varelius, Jouni Lintunen
> Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg,
> HRB 144331 B
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development

More information about the Development mailing list