Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-23138

Outer property binding assignment doesn't replace inner binding assignment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.0.0
    • 5.0.0
    • None
    • OSX 10.7.2 - qtdeclarative b156b5d8c313f3b3711b1da6e06768473db3cf12

    Description

      An enum defined in a module API:

       
      class MyModuleApi : public QObject
      {
          Q_OBJECT
          Q_ENUMS(MyEnum)
      
      public:
          enum Mode { DefaultEnumValue, SomeOtherEnumValue };
      };
      

      A style object (http://developer.qt.nokia.com/wiki/QmlStyling):

      // MyStyle.qml:
      import QtQuick 2.0
      import SomeModuleApi 1.0 as Module
      
      QtObject {
          property int foo: Module.DefaultEnumValue
      }
      

      A styled widget:

      // MyWidget.qml:
      import QtQuick 2.0
      
      Text {
          property MyStyle style: MyStyle { }
      
          horizontalAlignment: Text.AlignHCenter
          verticalAlignment: Text.AlignVCenter
      }
      

      A test case trying to assign module enum to a grouped property:

      // TestCase.qml
      import QtQuick 2.0
      import SomeModuleApi 1.0 as Module
      
      MyWidget {
          width: 300
          height: 300
      
          style.foo: Module.SomeOtherEnumValue // the value stays at Module.DefaultEnumValue
          text: style.foo
      }
      

      Attachments

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

        Activity

          People

            mvogt Matthew Vogt (closed Nokia identity) (Inactive)
            jpnurmi J-P Nurmi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes