import QtQuick 2.9 import QtQuick.Controls 2.4 ListView { id: control property int status: -1 signal refresh() anchors.margins: 10 anchors.rightMargin: 14 enabled: status === 200 || status === 902 opacity: enabled ? 1:0 ScrollBar.vertical: ScrollBar { parent: control.parent anchors { top: control.top left: control.right margins: 10 leftMargin: 3 bottom: control.bottom } width: 8 visible: control.model > 0 active: true } onContentYChanged: { if(contentY < -control.height * 0.3 && control.status !== 905){ contentY = 0 control.refresh() } } Behavior on opacity { NumberAnimation { duration: 200 } } Behavior on contentY { NumberAnimation { duration: 200 } } InfoArea { id: infoArea anchors { left: control.left right: control.right top: control.top margins: app.landscape() ? control.width * 0.4:control.width * 0.3 topMargin: control.height*( status === 901 ? 0.6:0.5) - height * 0.8 } excludedCodes: [200, 902, 905] errorCode: control.status } }