Here\'s what I\'ve in my QML:
import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.3
Window {
visible: tru
For that I've to use the additional contentItem
outside the ItemDelegate
like this:
contentItem: RowLayout{
Text{ text: model[control.currentIndex].name }
Text{
text: " | " + model[control.currentIndex].age
horizontalAlignment: Text.AlignRight
Layout.fillWidth: true
}
}
and I've to give the ComboBox
an id, here in the example control
is the id