How to generate moc files in Qt 5.9.1?
-
Hi,
I am trying to generate moc files in Qt 5.9.1 by adding new .ui file to the project but its not generating. -
@User002 How are you adding those ui files? Is it a qmake project? You need provide more information if you want to get help from others.
-
@jsulm Hi, not using qmake project.. I Created new Qt project in Visual studio 2013 and adding required ui files and generating. But moc files are not generating.
-
Are you using the Qt Visual Studio add-in? If you are, try reinstalling it. Otherwise you should install it. After that remove, then readd the .ui file(s).
VS doesn't know by itself what a .ui file is, so it needs a custom build step. That is where the Qt Visual Studio add-in comes in.
By the way, MOC is for program code (signal/slots etc.). For .ui files UIC is used. And RCC handles Qt resource files.