Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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.

    Question

    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 https://git.scanframe.com/shared/qt-concepts.git
    Run the ./build.sh . 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

    ui-serial.png


  • Lifetime Qt Champion

    Hi,

    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