I'm createing a project using Qt5. When I create a window layout with the QtDesginer, it creates a "file.ui" which then must be compiled into a ".java" or a ".h" file.
Example:
d:\opt\qt-5.2.1\bin\uic.exe -g cpp -o main_frame.h main_frame.ui
The problem now is, how do I setup the dependency of a custom build step for this generated include? I added the "ui" file to my workspace and created a build command for it, but in the build log, I can see that the build of the include is done after the cpp file is compiled. Then I added a pre build step, but this is always executed. So how can I tell CB to only do this if the "ui" file has been changed, just like any other regular compiled file?
So I finally understood how I can add this UIC compiler from Qt. However, CB now seems to generate the file every time and the linker stage is also executed. Strangely the cpp file where it is included is not recompiled unless I really change the UI file. So how can I tell CB that this file shouldn't trigger linking?
Here is the build log when I start the build without any changes:
-------------- Build: Debug in Datinator (compiler: GNU GCC Compiler)---------------
d:\opt\qt-5.2.1\bin\uic.exe -g cpp -o D:\src\c\Datinator\main_frame.h D:\src\c\Datinator\main_frame.ui
g++.exe -LD:\opt\qt-5.2.1\lib -o Debug\Datinator.exe Debug\obj\main.o -lgdi32 -luser32 -lkernel32 -lcomctl32 -lQt5Core -lQt5Gui -lGLESv2d -lQt5Widgetsd -mwindows
Output file is Debug\Datinator.exe with size 423.63 KB
Process terminated with status 0 (0 minute(s), 6 second(s))
0 error(s), 0 warning(s) (0 minute(s), 6 second(s))