Ok, let’s try to forward to development mailing list and see if we need to fire a bug.
Inizio messaggio inoltrato: > Da: Shantanu Tushar <[email protected]> > Oggetto: Re: [Interest] Strange ordering problem with ComboBox > Data: 13 aprile 2016 08:10:27 GMT+1 > A: Gian Maxera <[email protected]> > Cc: interest <[email protected]> > > I haven't experienced exactly the same, but I did experience that if I use a > QSortFilterProxyModel as a model for ComboBox and the sort order changes, > ComboBox doesn't update itself. (A ListView connected with the same model > updates). > > On Mon, Apr 11, 2016 at 3:06 PM, Gian Maxera <[email protected]> wrote: > Hello, > I’m using the ComboBox item of QML with more than two Items with a ListModel > like that: > > ComboBox { > id: rateType > anchors.horizontalCenter: parent.horizontalCenter > width: parent.width*0.9 > Component.onCompleted: { > if ( models.appointment.lead == null ) { > rateType.currentIndex = 0 > } else if ( models.appointment.lead.type == 'contact' ) > { > rateType.currentIndex = 0 > } else if ( models.appointment.lead.type == 'brochure' > ) { > rateType.currentIndex = 1 > } else if ( models.appointment.lead.type == 'tentative' > ) { > rateType.currentIndex = 2 > } else if ( models.appointment.lead.type == 'definite' > ) { > rateType.currentIndex = 3 > } > } > model: ListModel { > ListElement { > leadType: 'contact' > leadText: 'Contact only' > } > ListElement { > leadType: 'brochure' > leadText: 'Brochure request' > } > ListElement { > leadType: 'tentative' > leadText: 'Tentative lead' > } > ListElement { > leadType: 'definite' > leadText: 'Definite lead' > } > } > textRole: "leadText" > > But the popup menu appearing for select the option contain the elements into > a different order than ListModel and when you select one of those the > ComboBox select a different one. In such a way that it seems the index are > correct but the labels of the popup menu are wrong. > > Someone hits this error before ? > > I’m using Qt 5.5 for now. > > Ciao, > Gianluca. > > > > _______________________________________________ > Interest mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/interest > > > > > -- > Shantanu Tushar (UTC +0530) > shantanu.io
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
