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. Can a QComboBox resize itself when its parent changes size?

Can a QComboBox resize itself when its parent changes size?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 661 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
    drmhkelley
    wrote on last edited by
    #1

    I place a variety of widgets in a QGridLayout and expect them to resize themselves (according to the desired set[Column/Row]Stretch factors) when I stretch the containing widget. Many widgets (e.g. QLabel, QLineEdit, QTextEdit behave as expected. Unfortunately, QComboBox does not.

    Is it possible to convince it to exhibit that behavior?

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

      Hi¨
      ComboBox have fix height sat
      alt text

      So it wont grow in height just like QPushButtons. But you can just change it.

      1 Reply Last reply
      3
      • M Offline
        M Offline
        Mr Aloof
        wrote on last edited by
        #3

        use resizeEvent in parent

        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