Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8.2, 6.9.0
-
-
7d3c2da9f (dev), 83bbc685a (6.10), 469c3cbc6 (6.9), 074273fca (tqtc/lts-6.8)
Description
This bug already exists, but there is no reaction to my comment:
https://bugreports.qt.io/browse/QTBUG-39928
// not working Rectangle { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom width: parent.width height: 200 color: '#00000000' // color: '#0040e0d0' // not working gradient: Gradient { orientation: Gradient.Horizontal GradientStop { position: 0.00; color: '#ffcbf7c5' } GradientStop { position: 0.50; color: '#4dffffff' } GradientStop { position: 1.00; color: '#ffe6f1df' } } }
At the moment we have to use this ugly workaround where we set the color to empty string when there is a gradient.
color: widget.gradient ? '' : widget.color gradient: widget.gradient
The documentation clearly states "If both a color and a gradient are specified, the gradient is used"
Attachments
For Gerrit Dashboard: QTBUG-134403 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
644770,3 | Fix Rectangle with gradient and color set to transparent | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
649839,2 | Fix Rectangle with gradient and color set to transparent | 6.10 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
650972,2 | Fix Rectangle with gradient and color set to transparent | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
651150,2 | Fix Rectangle with gradient and color set to transparent | tqtc/lts-6.8 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |