Blue highlight on button press.
-
Qt Version: 6.6.0
(Sorry for anything weird, I'm a newbie in Qt)
As said in the title. When I click on a button, it's getting this blue highlight.
Here's how its looking like:



My QML file for menu buttons:
import QtQuick 2.15 import QtQuick.Controls 2.15 import Qt5Compat.GraphicalEffects Button { id: menuButton implicitWidth: 480 implicitHeight: 480 flat: true smooth: false property url iconPath: "../../img/homeIcon.svg" property color iconColor: "#818181" property color sideIndicatorColor: "#882ac0" property color colorDefault: "#ff0000" property color colorHover: "#00ff00" property color colorClicked: "#ff00ff" property bool leftIndicator: true property bool rightIndicator: false property bool isActive: true QtObject { id: internal property color dynamicColor: if (menuButton.down) { menuButton.down ? colorClicked : colorDefault } else { menuButton.hovered ? colorHover : colorDefault } } background: Rectangle { id: bg visible: true anchors.fill: parent activeFocusOnTab: false focus: false layer.enabled: false color: internal.dynamicColor Rectangle { id: imgContainer x: 0 y: 0 width: 68 height: 68 opacity: 1 visible: true color: "#00ffffff" border.color: "#00000000" Image { id: img source: iconPath mipmap: true smooth: true antialiasing: true anchors.verticalCenterOffset: 0 anchors.horizontalCenterOffset: 0 anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter anchors { right: rightSideIndicator rightMargin: 0 } height: parent.height * 1 fillMode: Image.PreserveAspectFit } ColorOverlay { anchors.fill: img source: img color: iconColor antialiasing: true } } Rectangle { id: rightSideIndicator color: sideIndicatorColor anchors.rightMargin: -2 anchors { top: parent.top bottom: parent.bottom right: parent.right left: imgContainer.right topMargin: 0 bottomMargin: 0 leftMargin: 0 } visible: isActive & rightIndicator ? true : false } Rectangle { id: leftSideIndicator color: sideIndicatorColor anchors.rightMargin: -2 anchors { top: parent.top bottom: parent.bottom right: imgContainer.left left: parent.left topMargin: 0 bottomMargin: 0 leftMargin: 0 } visible: isActive & leftIndicator ? true : false } } } -
Qt Version: 6.6.0
(Sorry for anything weird, I'm a newbie in Qt)
As said in the title. When I click on a button, it's getting this blue highlight.
Here's how its looking like:



My QML file for menu buttons:
import QtQuick 2.15 import QtQuick.Controls 2.15 import Qt5Compat.GraphicalEffects Button { id: menuButton implicitWidth: 480 implicitHeight: 480 flat: true smooth: false property url iconPath: "../../img/homeIcon.svg" property color iconColor: "#818181" property color sideIndicatorColor: "#882ac0" property color colorDefault: "#ff0000" property color colorHover: "#00ff00" property color colorClicked: "#ff00ff" property bool leftIndicator: true property bool rightIndicator: false property bool isActive: true QtObject { id: internal property color dynamicColor: if (menuButton.down) { menuButton.down ? colorClicked : colorDefault } else { menuButton.hovered ? colorHover : colorDefault } } background: Rectangle { id: bg visible: true anchors.fill: parent activeFocusOnTab: false focus: false layer.enabled: false color: internal.dynamicColor Rectangle { id: imgContainer x: 0 y: 0 width: 68 height: 68 opacity: 1 visible: true color: "#00ffffff" border.color: "#00000000" Image { id: img source: iconPath mipmap: true smooth: true antialiasing: true anchors.verticalCenterOffset: 0 anchors.horizontalCenterOffset: 0 anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter anchors { right: rightSideIndicator rightMargin: 0 } height: parent.height * 1 fillMode: Image.PreserveAspectFit } ColorOverlay { anchors.fill: img source: img color: iconColor antialiasing: true } } Rectangle { id: rightSideIndicator color: sideIndicatorColor anchors.rightMargin: -2 anchors { top: parent.top bottom: parent.bottom right: parent.right left: imgContainer.right topMargin: 0 bottomMargin: 0 leftMargin: 0 } visible: isActive & rightIndicator ? true : false } Rectangle { id: leftSideIndicator color: sideIndicatorColor anchors.rightMargin: -2 anchors { top: parent.top bottom: parent.bottom right: imgContainer.left left: parent.left topMargin: 0 bottomMargin: 0 leftMargin: 0 } visible: isActive & leftIndicator ? true : false } } }