Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- }
- }
- }
Add Comment
Please, Sign In to add comment