Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Reposition Qlabels, QLineEdit and QPushButton when user changes font size - how to do that?

Reposition Qlabels, QLineEdit and QPushButton when user changes font size - how to do that?

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 2 Posters 261 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.
  • P Offline
    P Offline
    PythonQTMarlem
    wrote on last edited by
    #1

    Python 3.9.1, Qt6.
    I position Qlabels, QLineEdit and QPushButton with setGeometry. The user can change the font size at runtime. If the font size is a certain size then Qlabels, QLineEdit and QPushButton will overlap. In such a case, how can I reposition Qlabels, QLineEdit and QPushButton so that my program window looks good again?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Since you are using setGeometry directly it's up to you to realign your widgets. Otherwise, there is the layout system that handles that automatically.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • P Offline
        P Offline
        PythonQTMarlem
        wrote on last edited by
        #3

        okay. Thank you

        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