Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-15732

If item added to content library has Connections element connecting item's signals, it doesn't work right

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • QDS 4.8.0
    • QDS 4.8.0
    • Content Library
    • None
    • 2
    • cddc26d6b (qds/dev)
    • QDS Oulu - 2025 Week 33/34

      • Create new generic/empty project
      • Right click on button in navigator
      • Select "Add to content library"
      • Check the generated Button.qml from the bundle directory (In windows it is C:\Users\<user>\Documents\QtDesignStudio\bundles\User\2d)

      --> The generated Connections element has incorrect content (marked with !!! comments):

      Button {
          id: root     
          anchors.horizontalCenter: parent.horizontalCenter
          anchors.verticalCenter: parent.verticalCenter
          checkable: true
          text: qsTr("Press me")    
          Connections {
              id:     // !!! ID empty
              target: button
              Button {   // !!! Generated entire new button when it should be connecting the root button
                  id: button
                  anchors.horizontalCenter: parent.horizontalCenter
                  anchors.verticalCenter: parent.verticalCenter
                  checkable: true
                  text: qsTr("Press me")
                  // !!! no actual onClicked created (should probably be empty anyway as original connection was to item not part of this component 
              }
          }
      } 

      I'm not sure if correct functionality would be just omitting the Connections element in this case as all it connects is external functionality, but if Connections is generated, it should omit the id (as original didn't have id) and connect the original button correctly and not generate another button.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            e0348803 Miikka Heikkinen
            e0348803 Miikka Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes