You can add a setItems() function in the root rectangle of DropDown which would be something like this
import QtQuick 1.1
Rectangle {
width:parent.width
height: parent.height
color:"transparent"
function setItems(items_arg){
comboBox.items = items_arg
}
Rectangle {
id:comboBox
property variant items:[1,2,3]
}
and in your main.qml or any other qml file you could do this
Rectangle {
DropDown{
id: dd
anchors.fill: parent
}
Component.onCompleted: {
dd.setItems([1, 5, 2, 1, 68, 12])
}
}