SpinBox showing a frame
Unsolved
QML and Qt Quick
-
Hi all!
Could anyone tell me how to get rid of this blue square that appear when I try to edit the value of spinBox via keyboard?My SpinBox:
import QtQuick 2.0 import QtQuick.Controls 2.12 SpinBox { id: sb1 from: 0 value: 0 to: 100 * 100 stepSize: 1 property int decimals: 2 property real realValue: value / 100 width: 100 height: 18 editable: true antialiasing: true anchors.leftMargin: 0 anchors.topMargin: 0 rightPadding: 30 leftPadding: 30 padding: 0 font.pointSize: 8 validator: DoubleValidator { bottom: Math.min(sb1.from, sb1.to) top: Math.max(sb1.from, sb1.to) } textFromValue: function(value, locale) { return Number(value / 100).toLocaleString(locale, 'f', sb1.decimals) } valueFromText: function(text, locale) { return Number.fromLocaleString(locale, text) * 100 } }
in My Main.qml:
CustomSB { id: spinX1 objectName: "prostDim1" width: 100 anchors.right: x12.left anchors.top: parent.top enabled: !aaa.checked editable: true stepSize: 10 anchors.topMargin: 12 anchors.rightMargin: 5 onValueModified: result7.text = calculateVolume (spinX1.value, spinX2.value, spinX3.value) decimals: 1 }