Is it possible to see C++ code with Qt Designer ? I can draw my interface and have it saved as a .ui file. Also, I can generate python code from .ui file using a .bat file. But I cannot view C++/Qt code generated from the UI, which I would like to get.
I looked for it and all I can find is doc. about how to generate the python from the .ui, which I can do but is not what I am looking for.
Thanks
The menu item "Form/View Code" is exactly what you expect - it shows the generated C++ code:
As you can see from the comments in the generated file, Qt designer also uses uic
(the Qt User Interface Compiler) to generate the code preview.
You can verify if uic
works properly by manually creating the source code:
.ui
file, e.g. sample.ui
uic -o sample.h sample.ui
from a command shellsample.h
then contains the generated source code