I have a Visual Studio Qt project using the Visual Studio Qt Add-in. The add-in automatically creates a Custom Build Tool rule for .ui files and for each header file that has classes with a Q_OBJECT declaration to run UIC and MOC, respectively.
All this works fine until I add the Custom Build Tool rule for the project as a whole. In this case, this rule applies to the Release assembly and causes the code to be signed and is set to Execute after: Build . In this configuration, the Debug assembly works correctly, but Release does not automatically start the MOC or UIC. I can right-click the Q_OBJECT and .ui file headers in the project browser and manually force compilation for all the necessary files, and they are correctly MOC'd and UIC'd, and then can be created, but recovery or assembly after cleaning does not always work .
Why is adding a project a Custom Build Rule for a project that seems to suppress the custom build rules of the tool associated with the .ui and Q_OBJECT headers?
source
share