PROTIP: Turn off Shadow Build in Qt Creator

Post Reply
lightsbybrian
Posts: 7
Joined: Thu Apr 20, 2017 3:13 am
Real Name: Brian

Note: This advice is based on Qt Creator 4.14.2 on Debian 10.7 (Buster).

It could be that I and one other person are the only two that had trouble figuring this out, but to get QLC+ to build in Qt Creator, you have to turn off Shadow Build in the configuration. Here's a screenshot:
qlc_qt_shadow_build.png
The build wiki says "Note: Out-of-tree builds are not tested and most probably do not work." I for one would emend that to say "...definitely do not work." Qt Creator defaults to "Shadow build" which is their term for out-of-tree build. Unfortunately, that approach leads to broken include paths in the test projects, among other possible problems. With "Shadow build" turned off, the Qt Creator build will be in-tree and will succeed.

This fixes errors such as "ui_assignhotkey.h" not being found.

Note that this will only make the build succeed. Debugging (without doing `make install`) is another kettle of fish, which I am still trying to straighten out for the case where I want to have a development version of QLC+ and a known-good version coexisting on the same system.
Yestalgia
Posts: 419
Joined: Thu Jun 17, 2021 9:31 am
Location: Australia
Real Name:
Contact:

Thank you this is really helpful
Post Reply