Can I get rid of the *.ui files?
-
Hi there..
I managed to get QT5 to run in Clion, using Cmake.
Means, I decided to do a clean code Project only, without the Usage of the QT Designer and its *.ui Files.
Sow.. I tried to search for, how I manage to use qt without the need of those files.. but all I found are masses of articles about, how to restore them, when they get deleted/lost/corrupted.. but not, how to make a Window Class without them 😅
I mean.. I can create a whole UI class.. with UI, header and source file.. but never will edit the UI.. which means.. it is a waste of space.. so..
Can someone push me in the right direction?
-
If you want to use Qt Designer to design your UI you will want to use
.ui
files.You do not have to use Designer or its
.ui
files. You can write code to create widgets and set their attributes. That's what code examples in the Qt documentation or on the Internet show.In fact, if you look at the files in your project, when you build it runs
uic
program to process the.ui
files and produce aui_....h
file. That is the full C++ code to create your designer widgets. If you look through that you can see exactly what code you could write instead of using the Designer and.ui
files. -
Thanks Guys.. helped me out alot :D