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. TextInput does not clip when text is too long
Forum Updated to NodeBB v4.3 + New Features

TextInput does not clip when text is too long

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

    I have created a simple text input as show below.

    TextInput {
              width: inputGroup.width
              text: ""
          }
    

    I type "ABC" repeatedly and eventually my text scrolls to the left, with the rightmost character aligned with the right edge of my input area. However, the characters on the left side are moving beyond the left edge of my input area (outside the box).

    scrn1.jpg

    I do I tell QML to clip, or prevent this?

    eyllanescE 1 Reply Last reply
    0
    • ocgltdO ocgltd

      I have created a simple text input as show below.

      TextInput {
                width: inputGroup.width
                text: ""
            }
      

      I type "ABC" repeatedly and eventually my text scrolls to the left, with the rightmost character aligned with the right edge of my input area. However, the characters on the left side are moving beyond the left edge of my input area (outside the box).

      scrn1.jpg

      I do I tell QML to clip, or prevent this?

      eyllanescE Offline
      eyllanescE Offline
      eyllanesc
      wrote on last edited by eyllanesc
      #2

      @ocgltd use clip property:

      TextInput {
          width: inputGroup.width
          clip: true
          text: ""
      }
      

      If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

      1 Reply Last reply
      4

      • Login

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