Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    General and Desktop
    2
    3
    71
    Loading More Posts
    • 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.
    • A.v.O
      A.v.O last edited by

      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:

      • com/misc/formwriter.cpp
      • rt-ui-serialize
      • custom-ui-plugin
      • build.sh

      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

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • A.v.O
          A.v.O last edited by

          Solved in (6.1.0 Beta 1 [19433])

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

          1 Reply Last reply Reply Quote 1
          • First post
            Last post