Hi,
in my QML Window I use a ScrollView to display some boxes. If the window is smaller than the content of the ScrollView I can't scrolling.
import QtQuick 2.12
import QtQuick.Controls 2.12
import GC 1.0
import assets 1.0
import components 1.0
Item {
property Cache selectedCache
Rectangle {
id: windowBox
anchors.fill: parent
Image {
width: parent.width
height: parent.height
source: Style.imageBackground
}
ScrollView {
id: scrollView
anchors {
left: parent.left
right: parent.right
top: parent.top //headerBox.bottom
bottom: parent.bottom //commandBar.top
margins: Style.sizeScreenMargin
}
clip: true
CacheBox {
id: cacheBox
cache: selectedCache
headerText: "Cache"
anchors.top: parent.top
anchors.topMargin: 15
anchors.left: parent.left
anchors.right: parent.right
}
TextBox_TinyMCE {
id: noteBox
textBoxContent: selectedCache.ui_note
headerText: "Notes"
anchors.top: cacheBox.bottom
anchors.topMargin: 15
anchors.left: parent.left
anchors.right: parent.right
}
AttributeBox {
id: attributeBox
cache: selectedCache
headerText: "Attribute"
anchors.top: noteBox.bottom
anchors.topMargin: 15
anchors.left: parent.left
anchors.right: parent.right
}
}
}
}
import QtQuick 2.12
import QtQuick.Controls 2.12
import GC 1.0
import assets 1.0
import components 1.0
Item {
property Cache selectedCache
Rectangle {
id: windowBox
anchors.fill: parent
Image {
width: parent.width
height: parent.height
source: Style.imageBackground
}
ScrollView {
id: scrollView
anchors {
left: parent.left
right: parent.right
top: parent.top //headerBox.bottom
bottom: parent.bottom //commandBar.top
margins: Style.sizeScreenMargin
}
clip: true
CacheBox {
id: cacheBox
cache: selectedCache
headerText: "Cache"
anchors.top: parent.top
anchors.topMargin: 15
anchors.left: parent.left
anchors.right: parent.right
}
TextBox_TinyMCE {
id: noteBox
textBoxContent: selectedCache.ui_note
headerText: "Notes"
anchors.top: cacheBox.bottom
anchors.topMargin: 15
anchors.left: parent.left
anchors.right: parent.right
}
AttributeBox {
id: attributeBox
cache: selectedCache
headerText: "Attribute"
anchors.top: noteBox.bottom
anchors.topMargin: 15
anchors.left: parent.left
anchors.right: parent.right
}
}
}
}
To copy to clipboard, switch view to plain text mode
I can't find any solution in google, so can you help me with my problem?
Thank you for your help.
BR
martin
Bookmarks