Qt World Summit: Register Today!

QFormLayout with QLineEdit which has clear button, size problem

  • 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

    Running view

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

Log in to reply