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

Colors with alpha are not handled property by QML when returned by JavaScript

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.0.1
    • None
    • Ubuntu Raring 13.04

    Description

      When returning a color that has an alpha value different from 1.0 from a JavaScript function, the alpha value is lost and set to 1.0

      Program reproducing the issue:

      import QtQuick 2.0

      Item {
      property color origColor: Qt.rgba(1.0, 1.0, 1.0, 0.2)
      property color destColor: {
      if (true)

      { return origColor; } else { return origColor; }

      }
      Component.onCompleted: print("Completed, destColor.a =", destColor.a)
      onDestColorChanged: print("Changed, destColor.a =", destColor.a)
      }

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            kaleo Florian Boucault
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes