Important: Please read the Qt Code of Conduct -

QFormBuilder does not save 'name' attribute on a 'widget' element

  • Problem

    When saving a form using QFormBuilder::save() the name attribute of the widget elements are missing.
    I expect QFormBuilder to save the attribute as the designer does.


    Is this a bug or by design?
    If not how can I make QFormBuilder to store the name attribute?

    Check/Debug for Yourself

    See my concept code qt-concepts.
    Some relevant contextual repository links:

    Clone the Git repository git clone
    Run the ./ . bash script in the repository root directory.
    When done, execute ./bin/rt-ui-serialize.bin.
    Read the file ./bin/analog-clock.ui and write it for example as ./bin/saved.ui using "Read UI" button and subsequent the "Write UI" button.
    Look at the resulting file in an editor and compare it.

    The test application looks like this when the ui-file is loaded


  • Lifetime Qt Champion


    From memory, Designer does some stuff a bit differently.

    You can check the bug report system to see if there's something related. If not, you can consider opening a feature request for that.

  • Solved in (6.1.0 Beta 1 [19433])

    Has been reported as a bug and was solved only in version 6.

Log in to reply