import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Shapes 1.12 Column { anchors.centerIn: parent spacing: BGridSystem.spacerL Button { text: "open popup" onClicked: popup.open(); } Popup { id: popup anchors.centerIn: parent contentItem: Row { spacing: 24 /************************************* * Using Qml Shape lead to a color bug * Steps to reproduice * * 1. open the popup * 2. clic on the left button * 3. close the popup by clicking outside * 4. open the popup again * 5. the button with the shape background is not in "blue" anymore * but the text is still in white, and the checked property is still true * The button is no usable anymore instead if we click on the second button * to uncheck the first one */ Button { id: btnShape text: "Shape background" checkable: true autoExclusive: true palette.button: btnShape.checked ? "blue" : "lightgrey" background: Shape { id: shape implicitWidth: 100 implicitHeight: 40 ShapePath { fillColor: btnShape.palette.button startX: 0 startY: 0 PathLine { x: shape.width; y: 0} PathLine { x: shape.width; y: shape.height} PathLine { x: 0; y: shape.height} PathLine { x: 0; y: 0} } } } Button { text: "Rectangle background" checkable: true autoExclusive: true } } } }