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. [solved]Boundaries of TextInput
Forum Updated to NodeBB v4.3 + New Features

[solved]Boundaries of TextInput

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 751 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.
  • B Offline
    B Offline
    bobbaluba
    wrote on last edited by
    #1

    How can clip off the text that is outside of a LineInput?

    Currently, when I type too much, the beginning of the input is moved outside on the left side:

    Screenshot:
    "http://i.imgur.com/bleVSeB.png":http://i.imgur.com/bleVSeB.png

    I would like the text on the left side to be clipped off instead. How can I do that?

    Relevant code:
    @
    Item {
    property alias text: input.text
    property alias maximumLength: input.maximumLength
    width: 180; height: 28
    TextInput {
    id: input
    color: "black"
    font.pixelSize: 16; font.bold: true
    anchors.centerIn: parent
    width: parent.width-16
    focus: true
    }
    }
    @

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bobbaluba
      wrote on last edited by
      #2

      Ah, finally figured it out, TextInput has a property named clip that has to be set to true

      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