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 does the width of qlineedit fit into the length of the text

How does the width of qlineedit fit into the length of the text

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 2.3k 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.
  • D Offline
    D Offline
    duncan98
    wrote on last edited by
    #1

    hello ,everyone
    How does the width of qlineedit automatically adapt to the length of text

    JonBJ 1 Reply Last reply
    0
    • D duncan98

      hello ,everyone
      How does the width of qlineedit automatically adapt to the length of text

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @duncan98
      I don't think it does. Are you looking for some kind of "line edit should expand & contract to fit text as user types characters"? I think you'd have to do this yourself via textChanged signal. If so, there are several hits out there if you Google, you could look at the accepted answer in https://stackoverflow.com/questions/30031103/qlineedit-auto-resize-to-content, I don't know if it's best but looks like it should work for you as you type.

      1 Reply Last reply
      3

      • Login

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