Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. SpinBox showing a frame
Forum Updated to NodeBB v4.3 + New Features

SpinBox showing a frame

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 287 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ACaldas
    wrote on last edited by
    #1

    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?

    47a0d4ae-47bd-4c0d-ad80-196adf783f6d-image.png

    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
                                    }
    
    1 Reply Last reply
    0
    • A Offline
      A Offline
      ACaldas
      wrote on last edited by
      #2

      Anyone, please?

      1 Reply Last reply
      0
      • MarkkyboyM Offline
        MarkkyboyM Offline
        Markkyboy
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved