Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. how to increase dropdown rectangle of ComboBox

how to increase dropdown rectangle of ComboBox

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 230 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.
  • YunusY Offline
    YunusY Offline
    Yunus
    wrote on last edited by
    #1

    I have a combobox item of Qml.

    qtquickcontrols2-combobox.png

    I want to increase the width of drop down rectangle(white area) but I want to keep header rectangle in the same size. Is there a way to do that ?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lemons
      wrote on last edited by
      #2

      sure, simply adjust the related parts of the combobox:
      https://doc.qt.io/qt-6/qtquickcontrols2-customize.html#customizing-combobox

      ComboBox {
          // [...]
          popup: Popup {
              // [...]
              implicitWidth: 222
              // [...]
          }
      }
      
      1 Reply Last reply
      1
      • YunusY Offline
        YunusY Offline
        Yunus
        wrote on last edited by Yunus
        #3

        yeah Ihave also solved by simply the code:

        comboBox.popup.width = 200
        
        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