Неверное отображение списка - PullRequest
1 голос
/ 21 апреля 2020

Объект типа ListView был создан в QML, проблема в том, что при прокрутке списка он «поднимется» на верхнюю панель инструментов. Как исправить?

Вот код:

ListView {
id: bookmarks

x: 5
y: 5

width: parent.width - 10
height: parent.height - 50
spacing: 2

model: ListModel {
    id: bookmarkList
}

delegate: BookmarkServer {
            thisName: inName
            thisHost: inHost
            thisPort: inPort
            thisUser: inUser
            thisPass: inPass
            thisEmb:  inEmb
        }

}

ToolBar {
id: tbDown
anchors {
         left: parent.left
         right: parent.right
         bottom: parent.bottom
     }

height: 40


Image {
    anchors.fill: parent

    id: tbImg
    source: "Res/iPad/KeyboardToolbar.png"
}

Row{
    width:  parent.width
    height: parent.height

    ToolButton {
        id: addBookmark
        height: parent.height
        width:  parent.width / 3

        Image {
            anchors.centerIn: parent
            id: add
            source: "Res/images/ui_elements/icon_add.png"
        }

        onClicked: {

            stackView.push("AddingBookmark.qml")

            console.log("AddingBookmark")
        }
    }

    /***************************************************************************************************/
    ToolButton {
        id: monitoring
        height: parent.height
        width:  parent.width / 3

        Image {
            anchors.centerIn: parent
            id: monitor
            source: "Res/images/ui_elements/monitor.png"
        }

        onClicked: {
            stackView.push("Monitoring.qml")



            console.log("MONITORING")
        }
    }

    /***************************************************************************************************/
    ToolButton {
        id: info
        height: parent.height
        width: parent.width / 3

        Image {
            anchors.centerIn: parent
            id: information
            source: "Res/images/ui_elements/icon_information.png"
        }

        onClicked: {
            stackView.push("Help.qml")
            console.log("INFO")
        }
    }
}
}

Верхняя панель инструментов объявлена ​​в другом файле, она находится в StackView под данными.

Вот видео проблемы: https://youtu.be/Qb4ITabivFI

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...