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

V4 binding evaluation drops alpha channel from the color type

    XMLWordPrintable

Details

    Description

      Following code

      import QtQuick 2.0
      
      Item {
          property color color: Qt.rgba(0.3, 0.3, 0.3, 0.3)
          property color v4Result: true ? color : "transparent"
      
          Component.onCompleted: {
              console.log("Original color rgba", color.r, color.g, color.b, color.a)
              console.log("Color through V4", v4Result.r, v4Result.g, v4Result.b, v4Result.a)
          }
      }
      

      outputs

      Original color 0.30000762951094834 0.30000762951094834 0.30000762951094834 0.30000762951094834
      Color through V4 0.2980392156862745 0.2980392156862745 0.2980392156862745 1
      

      Instead the color should stay semi-transparent.

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            jpetrell Joona Petrell
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes