Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-15781

Qt Quick Designer loses the selection when custom enumeration is used

    XMLWordPrintable

Details

    Description

      There is a custom QML Module containing a custom enumeration. When an item in the module has a property with value defined by the custom enumeration, Qt Quick Designer don't know the selected value and falls back to the first (default) item of the enumeration. For example, if the enumeration has values

      {AlignLeft, AlignHCenter, AlignRight}

      Qt Quick Designer shows always AlignLeft. This doesn't affect to the actual qml file. There the value is correct.

      Tested on Linux (Ubuntu 14.04) and Windows 7.

      The attached example contains a custom QML module (qtcreatorbug15781.zip) and a test project (qtcreatorbug15781test.zip). Build and install the module and copy the installed files under Qt Creator (if needed). Then open the test project's main.qml in the Designer. The Test Enum value of TestElement is AlignLeft (it is AlignHCenter in qml file). If you change the value and save, it is AlignLeft again (qml file has the changed value).

      Attachments

        Activity

          People

            thohartm Thomas Hartmann
            qtcomsupport Qt Support
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: