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

"Inline" overrided property value not applied correctly

    XMLWordPrintable

Details

    Description

      See the commit here http://qt.gitorious.org/~mathiasm/qt-components/mathiasm-qt-components/commit/1654a28bae25334fae5a48d5a2f6b993a8220e3d

      On line 171 in Gallery.qml, the overriding of the SpinBox's background color defined this way works (see attached snapshot1.png):

      property color foo: "red"
      SpinBox{ styling.backgroundColor: parent.foo; styling.textColor: column3.fg}
      

      But if the "foo" property is removed and the backgroundColor is set to red "inline", then the background color is not applied (see snapshot2.png):

      SpinBox{ styling.backgroundColor: "red"; styling.textColor: column3.fg}
      

      Clone the repo here
      git://gitorious.org/~mathiasm/qt-components/mathiasm-qt-components.git
      and checkout the QTBUG-17276 branch, or download the code from here
      http://qt.gitorious.org/qt-components/mathiasm-qt-components/archive-tarball/QTBUG-17276
      To run the code do

      ./configure
      make
      make install
      

      and run the examples/Gallery.qml file with qmlviewer.

      Attachments

        1. main.qml
          0.2 kB
        2. snapshot1.png
          snapshot1.png
          81 kB
        3. snapshot2.png
          snapshot2.png
          81 kB
        4. Style.qml
          0.3 kB
        5. StyledRect.qml
          0.4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            aakenned Aaron Kennedy
            mathiasm Mathias Malmqvist
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes