[Solved]initialize error of ComboBox : Cannot read property 'constructor' of undefined
-
When I try to initialize the model of ComboBox, weird error pop out
@import QtQuick 2.2
import QtQuick.Controls 1.1Rectangle {
width: 100
height: 62ListModel{ id: modelA } ComboBox{ model: modelA } Component.onCompleted: { modelA.append({"source" : "hhhh"}) }
}@
error message
file:///C:/Qt/Qt5.2.0/5.2.0/mingw48_32/qml/QtQuick/Controls/ComboBox.qml:496: TypeError: Cannot read property 'constructor' of undefined
How could I fix this error?
-
Found the solution, use loader to load the ComboBox when insert or
"Your text to link here...":http://stackoverflow.com/questions/20833809/initialize-error-of-combobox-cannot-read-property-constructor-of-undefined#comment31247640_20833809