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

How attached properties are generated in QML should respect the existing code

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • QDS 4.4
    • None

    Description

      Let's say there's a code like this in QML:

       

      // Some.qml
      Text {
          text: "hello"
          font {
              pixelSize: 12
          }
      }

      Then the user edits the font family in Property View and the result of code generation currently goes like this:

      // Some.qml
      Text {
          text: "hello"
          font {
              pixelSize: 12
          }
          font.family: "Noto Sans"
      } 

      Ideally, it should go like this:

      // Some.qml 
      Text { 
          text: "hello" 
          font { 
              pixelSize: 12 
              family: "Noto Sans"  
          }
      }  

      The reason why this is important are:

       

      1. The code gets messy with the current way
      2. The reason why one wants to use anchors { centerIn: parent } or font { family: "Noto Sans" } rather than anchors.centerIn: parent and font.family: "Noto Sans" is because one can place a set of similar kinds of code in one place instead of speading font. whatever all over the place. The current way QDS generates code breaks this.

      Attachments

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

        Activity

          People

            thohartm Thomas Hartmann
            mikio_hirai Mikio Hirai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes