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. QHBoxLayout changes the width of QLineEdit and QPushButton with size policy of "fixed"
Qt 6.11 is out! See what's new in the release blog

QHBoxLayout changes the width of QLineEdit and QPushButton with size policy of "fixed"

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 1.2k 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 jronald
    #1
    1. Why?
    2. How to use fixed size for QLineEdit and QPushButton?
    raven-worxR 1 Reply Last reply
    0
    • jronaldJ jronald
      1. Why?
      2. How to use fixed size for QLineEdit and QPushButton?
      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @jronald
      show some code please what you are doing exactly.
      Do you maybe set the size-policy after you've added the widget to the layout?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      jronaldJ 1 Reply Last reply
      0
      • raven-worxR raven-worx

        @jronald
        show some code please what you are doing exactly.
        Do you maybe set the size-policy after you've added the widget to the layout?

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

        @raven-worx

        I did it in the designer, for example:

        1. drag a line edit and a push button to a widget
        2. change the size policies to fixed
        3. change the sizes arbitrarily for showing the problem more obvious later
        4. select both, right click, apply horizontal layout
        5. the sizes of the widgets will be resized
        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