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

Binding Editor and Property View don't treat enum constants as constants

    XMLWordPrintable

Details

    Description

      Steps to reproduce

      1. Create a new Empty project that targets Qt 6.5
      2. Add the following snippets to the auto-generated files:
        // <PROJECT_NAME>/Constants.qml
        enum MyEnum {
            Alpha,
            Bravo,
            Charlie
        }
        
        // <PROJECT_NAME>Content/Screen01.ui.qml
        Item {
            id: testItem
            x: Constants.Bravo
            property int enumConst: Constants.Bravo
            property int intConst: 10
        }
        

       

      Outcomes
      Property View:

      • The value of testItem.x == 1 (Expected)
      • The value of testItem.intConst == 10 (Expected)
      • The value of testItem.enumConst == 0 (Not Expected)
      • testItem.intConst is treated as a constant (Expected)
      • testItem.x and testItem.enumConst are treated as bindings (Not Expected)

       

      Binding Editor:

      • testItem.intConst is not shown (Expected)
      • testItem.x and testItem.enumConst are shown, with "Constants.Bravo" treated as a source property (Not Expected)

      Attachments

        Issue Links

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

          Activity

            People

              henning Henning Gründl
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes