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. Qt Quick Controls 2: Combobox Indicator Location
Forum Updated to NodeBB v4.3 + New Features

Qt Quick Controls 2: Combobox Indicator Location

Scheduled Pinned Locked Moved Solved QML and Qt Quick
comboboxcontrol 2
2 Posts 1 Posters 1.3k 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.
  • A Offline
    A Offline
    ad7000
    wrote on last edited by
    #1

    Hello,
    Does anyone know how one can go about moving the right hand combobox dropdown indicator to the left of the control? I have tried changing the x position of the indicator but this only moved the indicator display component, not the clickable region. Here's the relevant snippet:

    ComboBox {
        id: combo
    
        ....
    
        property string placeholderText: ""
        property bool indicatorRight: true
    
        anchors.fill: parent
        editable: true
        editText: placeholderText
        model: options
        palette { text: "white"; highlight: "black" }
        font { pointSize: 14; styleName: "Helvetica"; weight: Font.Medium }
    
        indicator: Image {
            height: combo.height - 10; width: height
            x: indicatorRight ? combo.width - width : 0;
            y: 5
            source: "qrc:/Images/images/menu_dots_white.png"
        }
    
        ....
    
    }
    

    Thanks in advance.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      ad7000
      wrote on last edited by ad7000
      #2

      Nvm, sorta jumped the gun with the question. Haven't looked at the source, but by inspection it seems the ComboBox's content view covers the underlying mouse area that is used to access the menu.

      Setting the rightPadding and leftPadding of the ComboBox appropriately uncovers the clickable region on that side of the ComboBox, so, for example, setting rightPadding to 10 gives a 10px wide clickable region on the right, and likewise for the left.

      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