mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-15 14:51:14 -08:00
add new example 'advanced-qml-auto-reload' (single file reload); revisions
This commit is contained in:
parent
5f3b251a69
commit
1473ec8271
28 changed files with 1144 additions and 2 deletions
46
examples/advanced-qml-auto-reload/qml/main.qml
Normal file
46
examples/advanced-qml-auto-reload/qml/main.qml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import ".ext/" as Ext // for single file auto reload (development)
|
||||
//import "ext/" as Ext // release version
|
||||
|
||||
Rectangle {
|
||||
width: 300
|
||||
height: 500
|
||||
color: "black"
|
||||
|
||||
SwipeView {
|
||||
id: view
|
||||
objectName: "view"
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
color: "white"
|
||||
|
||||
Ext.Repl {}
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "swipe for next page"
|
||||
}
|
||||
}
|
||||
|
||||
// N.B. don't use Loader inside a Repeater here, won't work with single
|
||||
// file auto reload (which already uses a Loader)
|
||||
|
||||
Ext.Page1 {}
|
||||
Ext.Page2 {}
|
||||
Ext.Page3 {}
|
||||
}
|
||||
|
||||
PageIndicator {
|
||||
anchors.bottom: view.bottom
|
||||
anchors.bottomMargin: 10
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
count: view.count
|
||||
currentIndex: view.currentIndex
|
||||
}
|
||||
|
||||
FontLoader { id: fontIcons; source: "fonts/fontawesome-webfont.ttf" }
|
||||
FontLoader { id: fontHack; source: "fonts/Hack-Regular.ttf" }
|
||||
FontLoader { id: fontHackBold; source: "fonts/Hack-Bold.ttf" }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue