Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    How to make inputMask with QML

    General and Desktop
    1
    1
    700
    Loading More Posts
    • 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.
    • J
      jago last edited by

      Hi, what I need is an inputMask of this format: 0000.00. When I click the buttons (0-9), the TextInput should change accordingly. I tried it like this, but it didn't function:

      TextInput {
      id: displayNumbers6Text
      inputMask: "0000.00"
      color: "#ffffff"
      }

      Buttons have MouseArea, for example for Number 2:

      MouseArea {
      anchors.fill: parent
      onPressed: {parent.buttonColor = "#a0c119"}
      onReleased: {parent.buttonColor = "#000000"}
      onClicked: {
      displayNumbers6Text.inputMask = displayNumbers6Text.inputMask + "2"
      }
      cursorShape: Qt.PointingHandCursor
      }

      Please help!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post