Thanks, I will see how it works. Though I will use the model: 10 syntax
like this :(

On Wed, Feb 7, 2018 at 5:46 PM, Helmut Mülner <[email protected]>
wrote:

> Ø  And basically the only thing that really hurts me with controls 2 is
> that combobox becomes quite horrible
>
>
>
> I use something like this for a decent looking combobox:
>
>
>
> ComboBox {
>
>         id: *comboBox*
>
>         Layout.fillWidth: true
>
>         height: 30
>
>         Layout.maximumHeight: 30
>
>         Layout.minimumHeight: 30
>
>         font.pointSize: 10
>
>         anchors.verticalCenter: *parent*.verticalCenter
>
>         textRole: "name"
>
>         model: myModel
>
>         delegate: ItemDelegate {
>
>             width: *comboBox*.width
>
>             height: 30
>
>             contentItem: Text {
>
>                 id: *itemDelegateText*
>
>                 text: name
>
>                 font: *comboBox*.font
>
>                 elide: Text.ElideRight
>
>                 verticalAlignment: Text.AlignVCenter
>
>             }
>
>             highlighted: *comboBox*.highlightedIndex == index
>
>         }
>
>     }
>
>
>
> Cheers,
>
> Helmut
>
>
>
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to