add ScrollBarType

This commit is contained in:
Cyril Anisimov 2024-12-06 22:57:50 +01:00
parent f992252c6e
commit 87d00116e1
9 changed files with 19 additions and 16 deletions

View file

@ -25,7 +25,7 @@ Flickable {
Keys.onUpPressed: scrollBar.decrease()
Keys.onDownPressed: scrollBar.increase()
ScrollBar.vertical: ScrollBar {
ScrollBar.vertical: ScrollBarType {
id: scrollBar
policy: fl.height >= fl.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
}

View file

@ -0,0 +1,11 @@
import QtQuick
import QtQuick.Controls
import "./"
import "../Controls2"
ScrollBar {
id: root
policy: ScrollBar.AsNeeded
}