Create Qt components with all parameters specified otherwise it will be instantiated with default properties

This commit is contained in:
Cameron Gutman
2018-08-16 23:29:46 -07:00
parent c1b1719914
commit 30f673efe1
4 changed files with 11 additions and 16 deletions

View File

@@ -154,9 +154,7 @@ GridView {
if (model.paired) {
// go to game view
var component = Qt.createComponent("AppView.qml")
var appView = component.createObject(stackView)
appView.computerIndex = index
appView.objectName = model.name
var appView = component.createObject(stackView, {"computerIndex": index, "objectName": model.name})
stackView.push(appView)
}
else {