ViewSolutions/README.md

62 lines
1.2 KiB
Markdown
Raw Normal View History

2020-04-27 19:00:06 +03:00
# ViewSolutions
2021-06-08 17:15:38 +03:00
2020-04-27 19:00:06 +03:00
View solutions of qml for quasarapp projects
2020-04-29 21:26:46 +03:00
2021-06-08 17:15:38 +03:00
## QML classes:
2020-04-29 21:26:46 +03:00
#### ImageView
2021-06-08 17:15:38 +03:00
2020-04-29 21:26:46 +03:00
This is animate image viewer
2021-06-08 17:15:38 +03:00
2020-04-29 21:26:46 +03:00
##### Example:
2021-06-08 17:15:38 +03:00
```qml
import ViewSolutionsModule 1.0
ImageView {
anchors.fill: parent
soucre: "qrc:/img/images/example.png"
text: "exampele"
anchors.margins: 100
borderColor: "red"
}
2020-05-11 19:09:17 +03:00
```
#### ViewPortPage
2021-06-08 17:15:38 +03:00
2020-05-11 19:09:17 +03:00
This is animate Delegate viewer for ListView
2021-06-08 17:15:38 +03:00
2020-05-11 19:09:17 +03:00
##### Example:
2021-06-08 17:15:38 +03:00
```qml
import ViewSolutionsModule 1.0
ListView {
id: viewPort
property real globalPos: 0
anchors.fill: parent
delegate: Component {
ViewPortPage {
viewPortDelegatH: 500 // base size of content item
scrollPos: viewPort.globalPos // due to qml limitations, this field will have to be tied to updating the location of the scroll
source: modelData
viewground: root // this is plane to display the main background
title: "Test ViewPortPage"
text: "Test ViewPortPage. General text and <i>html code</i>"
2020-05-11 19:09:17 +03:00
}
2021-06-08 17:15:38 +03:00
}
2020-05-11 19:09:17 +03:00
2021-06-08 17:15:38 +03:00
ScrollBar.vertical: ScrollBar {
onPositionChanged: {
viewPort.globalPos = position
2020-05-11 19:09:17 +03:00
}
2021-06-08 17:15:38 +03:00
}
2020-05-11 19:09:17 +03:00
2021-06-08 17:15:38 +03:00
model: [
"qrc:/img/res/LOGO.png",
"qrc:/img/res/LOGO-GREAN.png",
]
}
```