Compiler error after reinstalling Qt
-
I recently had to reinstall Qt on my system. Was earlier using Qt creator 7.0.2 community it got upgraded to Qt Creator 12. I chose the same supporting Qt version 5.15.2 as was used before from Qt installer tool. When trying to build the project which I was working on, I get the following error:
uic: Error in line 498, column 27 : Unexpected element fontweight
File '..<projectname-removed for privacy>\settings.ui' is not valid
jom: <build path>\Makefile.Release [ui_settings.h] Error 1jom: <build path>\Makefile [release] Error 2
16:22:07: The process "C:\Qt\Tools\QtCreator\bin\jom\jom.exe" exited with code 2.
Error while building/deploying project <project name> (kit: Desktop Qt 5.15.2 MSVC2019 64bit)
When executing step "Make"There appears to be a mismatch in how Qt was reading UI files before and after. I checked the design file, the error is thrown for a push button randomly, whereas there are many other screens with QPushButtons.
What could be the reason for this error.. I am totally lost. Would really appreciate any help. Attaching the kits and compilers being currently used
-
@AdviInfo said in Compiler error after reinstalling Qt:
Is there any way to import older ui files/projects as a whole to newer Qt versions?
Well doubtless not (other than using an older
uic
), else it would have said so? I don't know how old it is if fontweight used to exist but no longer does. Anyway, suggest you use a text editor/substitution script across your.ui
files to make whatever change is necessary. -
@AdviInfo
If you can't find anything else which works. Try telling jom not to do any builds in parallel and see if that goes through. Just maybeuic
was being run to generateui_settings.h
at the same time as compilation was trying to read it?Having said that
File '..<projectname-removed for privacy>\settings.ui' is not valid
implies it does not like the content of the
.ui
file in the first place. Is the error repeatable? I would look at line 498, column 27 to see what is going on. -
@JonB I checked. The project was created using an older version of Qt. The pushbuttons in designer forms had a property 'fontweight' - which doesn't come up in forms created using the newer version of qt creator which I'm using. There are numerous buttons on different screens, so it's not possible to replace them all. Is there any way to import older ui files/projects as a whole to newer Qt versions?
-
@AdviInfo said in Compiler error after reinstalling Qt:
Is there any way to import older ui files/projects as a whole to newer Qt versions?
Well doubtless not (other than using an older
uic
), else it would have said so? I don't know how old it is if fontweight used to exist but no longer does. Anyway, suggest you use a text editor/substitution script across your.ui
files to make whatever change is necessary. -