Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to create or modify a QT form based on a text file
eptos last edited by
I would like to create a windows application that displays a window based on a existing text file. For example, I may have a text file with the following information:
@window_size 400, 300
My program should be able to read this text file and create a window of 400 x 300 pixels, with 2 push buttons and 5 radio buttons. Of course, the content of the text file may change and is unpredictable. Please ignore at this moment other nessesary data, like the position and size of the buttons, I just need to know if its possible to do this, and a general idea on how to do it.
I'm using Qt with C++. I may change Qt if there is a better option to do this, but I must stick with C++.
Qt already does have textual UI files: they are normally compiled into C++ code at compile time (using the UI compiler: uic), but they can be loaded at runtime using UILoader.