Are Qt .ui files processed at compile time or runtime?
I am using Qt Creator. When I compile an application, are the .ui files turned into compiled code, or are they read and processed at runtime. I ask simply because I am looking at UI performance and if it is loaded at runtime开发者_开发百科 I would imagine there would be some penalty to that?
If you are using QtCreator and not changing anything to your project, the ui file will be used to generate a header file containing the code creating the UI.
For example if your ui file is myform.ui
, the header file generated (with the uic
tool) will be ui_myform.h
.
If you open it, you'll see the code creating your ui.
I believe that you can do either — but if you haven't written any special code to load .ui
files at runtime, it's probably compiled into C++.
精彩评论