How to create or modify a QT form based on a text file



  • Hi everyone,

    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
    push_button 2
    radio_button 5@

    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++.


  • Moderators

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.