Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to make inputMask with QML
Forum Updated to NodeBB v4.3 + New Features

How to make inputMask with QML

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 773 Views 1 Watching
  • 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 Offline
    J Offline
    jago
    wrote on last edited by
    #1

    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
    0

    • Login

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