-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mita
committed
May 22, 2014
1 parent
17737ab
commit 74ac77f
Showing
4 changed files
with
21 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
import QtQuick 2.0 | ||
|
||
Rectangle { | ||
anchors.fill: parent; | ||
id: mainStage | ||
//Main view rectangle | ||
Rectangle { | ||
anchors.fill: parent; | ||
id: mainStage | ||
} | ||
|
||
property string ui_data | ||
//A hidden item that manages the data change of the main view | ||
Item { | ||
property string ui_data | ||
|
||
ui_data: client.ui_data | ||
ui_data: client.ui_data | ||
|
||
onUi_dataChanged:{ | ||
Qt.createQmlObject(client.ui_data, mainStage) | ||
} | ||
onUi_dataChanged:{ | ||
mainStage.data = {} | ||
Qt.createQmlObject(client.ui_data, mainStage) | ||
} | ||
|
||
Component.onCompleted: | ||
{ | ||
console.log("UML: " + client.ui_data); | ||
//var component = Qt.createQmlObject("import QtQuick 2.0; import QtQuick.Controls 1.1; Button { text: 'This is just a test'; onClicked: console.log('Test!'); }", mainStage); | ||
var component = Qt.createQmlObject(client.ui_data, mainStage); | ||
Component.onCompleted: | ||
{ | ||
console.log("UML: " + client.ui_data); | ||
//var component = Qt.createQmlObject("import QtQuick 2.0; import QtQuick.Controls 1.1; Button { text: 'This is just a test'; onClicked: console.log('Test!'); }", mainStage); | ||
var component = Qt.createQmlObject(client.ui_data, mainStage); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters