Created
August 21, 2019 07:29
-
-
Save amfasis/8f35d1b1c09a3f5ef06cd042f83be109 to your computer and use it in GitHub Desktop.
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
import QtQuick 2.12 | |
import QtQuick.Window 2.12 | |
import QtQuick.Controls 2.5 | |
Window { | |
visible: true | |
width: 640 | |
height: 480 | |
title: qsTr("Hello World") | |
Timer { | |
interval: 1000 | |
running: true | |
repeat: false | |
onTriggered: { | |
listview.model = list | |
timer2.running = true | |
} | |
} | |
Timer { | |
id: timer2 | |
interval: 1000 | |
running: false | |
repeat: true | |
onTriggered: list.append({"title": "add"}) | |
} | |
ListModel { | |
id: list | |
ListElement { title: "test1" } | |
ListElement { title: "test 2" } | |
ListElement { title: "test 3" } | |
} | |
ListView { | |
id: listview | |
anchors.fill: parent | |
populate: Transition { | |
id: _popuTrans | |
SequentialAnimation { | |
PropertyAction { property: "scale"; value: 0.0 } | |
PauseAnimation { duration: 500 * _popuTrans.ViewTransition.index } | |
NumberAnimation { property: "scale"; from: 0.0; to: 1.0; duration: 2000; easing.type: Easing.InOutQuad } | |
} | |
} | |
add: Transition { | |
NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: 4000 } | |
} | |
delegate: MenuItem { | |
text: model.title | |
width: parent.width | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment