Qt World Summit: Submit your Presentation

How to save customized ui at runtime?

  • I want to save ui file (xml format) at runtime after some customization

  • Moderators

    Please do, nobody prevents you from doing that...

    More seriously: what do you mean? Do you have some custom .ui generator? Or you want to modify the way your application looks based on runtime user input? If the latter is the case, then the answer is: you don't. Your compiled application does not know anything about the .ui file, all it has got is the generated header (ui_*.h). You need to either use QUILoader, or design your application UI so that it can be changed (you have all the powers needed to do it in C++).

    But to give any more details, I need some more info from you.

  • Thanks so mush for your reply,
    It is first time for me to use QT, and my knowledge in C++ is basic
    -I tried to reload already saved .ui file that created before in designer using QuiLoader
    -what I'm asking about is
    change the UI (adding new controls for example) and change the style (colors and fonts ) at runtime and save this created ui to reload it again later with latest changes I did.

  • Moderators

    OK, then please do this:

    • read a book on C++
    • read a book on Qt

    and then continue with your project. I could explain everything to you, but it's already done in the books, and much better than I could.

Log in to reply