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. QFormLayout with QLineEdit which has clear button, size problem
Forum Updated to NodeBB v4.3 + New Features

QFormLayout with QLineEdit which has clear button, size problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 450 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.
  • jronaldJ Offline
    jronaldJ Offline
    jronald
    wrote on last edited by
    #1

    QFormLayout with QLineEdit which clear button,
    by default when the clear button shows, the width of QLineEdit changes.
    If set horizontal size policy to Ignore and min width of QLineEdit to 100, the QLineEdit work as expected (i.e. fixed width),
    but the labels got problems as in the screenshots below.

    Design view
    a.png

    Running view
    b.png

    jronaldJ 1 Reply Last reply
    0
    • jronaldJ jronald

      QFormLayout with QLineEdit which clear button,
      by default when the clear button shows, the width of QLineEdit changes.
      If set horizontal size policy to Ignore and min width of QLineEdit to 100, the QLineEdit work as expected (i.e. fixed width),
      but the labels got problems as in the screenshots below.

      Design view
      a.png

      Running view
      b.png

      jronaldJ Offline
      jronaldJ Offline
      jronald
      wrote on last edited by
      #2

      By setting both min width and max width of QLineEdit, the problem is solved.
      However, what is the proper way?

      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