Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to create or modify a QT form based on a text file
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 740 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eptos
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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.

      (Z(:^

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved