Created
May 22, 2018 08:38
-
-
Save rominf/a63c9892e5c7a811b7934b5f2ed6e65d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import QtQuick 2.9 | |
import QtQuick.Controls 2.1 | |
import QtQuick.Window 2.2 | |
Window { | |
id: window | |
visible: true | |
width: 640 | |
height: 480 | |
title: qsTr("Hello World") | |
ListView { | |
id: view | |
height: 48 | |
delegate: TextField { | |
text: modelData | |
} | |
model: ListModel { | |
id: model | |
ListElement { | |
modelData: "test" | |
} | |
} | |
} | |
Button { | |
anchors.top: view.bottom | |
onClicked: { | |
window.title = model.get(0).modelData; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment