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. QML ComboBox Popup Issue

QML ComboBox Popup Issue

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlqtquick2combobox
1 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.
  • P Offline
    P Offline
    pra7
    wrote on 2 Jun 2018, 06:30 last edited by pra7 6 Feb 2018, 06:32
    #1

    Hi All, I have used so many combo boxes recently but there is an issue in the popup of a particular ComboBox which I am not able to find the exact problem following is the code:

    import QtQuick 2.9
    import QtQuick.Window 2.2
    import QtQuick.Controls 2.2
    
    Window {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
    
        ComboBox{
            id:comboNum
            width:parent.width * 0.30
            height:parent.height * 0.15
            model: ["12","23","78","23","45","70"]
            currentIndex: 0
    
            popup: Popup{
                id:popup
                y: comboNum.height - 1
                width: comboNum.width
                height: comboNum.height * 2
                padding: 1
    
                contentItem: ListView {
                    id: listview
                    implicitHeight: popup.height
                    clip: true
                    model:comboNum.delegateModel
                    currentIndex: comboNum.highlightedIndex
                    interactive: true
                    highlightMoveDuration: 0
                    boundsBehavior: ListView.StopAtBounds
    
                    ScrollBar.vertical:ScrollBar {}
                }
            }
        }
    }
    

    The popup doesn't show all the elements and i am using QT 5.9.1.

    1 Reply Last reply
    0

    1/1

    2 Jun 2018, 06:30

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved