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. QFormBuilder does not save 'name' attribute on a 'widget' element
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 182 Views
  • 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.OA Offline
    A.v.OA Offline
    A.v.O
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0
      • A.v.OA Offline
        A.v.OA Offline
        A.v.O
        wrote on last edited by
        #3

        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
        1

        • Login

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