How to get UI Header files without building everything? Nor without using a script that manually runs UIC. Apparently, there's a built-in way to do that.
-
wrote 21 days ago last edited by karl-police
I made a script that would generate the UI Header files. However, I was told about that there's things like
Core_autogen
and etc. that generate the header files, without having to build everything!What I want are the
ui_*.h
files from the.ui
files WITHOUT building.I don't want to build everytime I change something in a
.ui
file.Now the problem is, how do you do that???????????
Like, I... don't get it. Like, I have to drill somewhere to find what I want to do.
I am using
ninja
to build, idk. How do you make those.h
without having to manually create a script for it. Like... WHAT DO YOU DO. It's like. I don't get it.You have created a system, that has stuff like
qt_add_ui
But the
.h
files are only available if you build the thing. But I don't want to build the thing just to get intellisense in Visual Studio IDE. So how can this be fixed.How do I make those
_autogen
targets appear.For every
qt_add_ui
it creates a target, but how do you just run all the header stuff at once, without building. I can't just make another separate CMake .txt file I think. It will error because it can't find the target thing to like combine it with, e.g.add_executable
Like inside
build.ninja
you'll see a new target for every single.h
file like...... WHY -
A slightly confusing and complicated way to ask:
"How can I create a.h
file from a.ui
file manually?"The answer is:
Use theuic
executable as documented here.
It's located in thelibexec
directory of your Qt installation.
2/2