Qt World Summit: Register Today!

[Solved] Flickable problem. Children item visible outside flickable area.

  • Simple example:
    import QtQuick 1.1

    Rectangle {
    id: page
    width: 300
    height: 400

    Rectangle {
        anchors.fill: parent
        anchors.margins: 100
        color: "green"
        Flickable {
            id: flickable
            anchors.fill: parent
            contentHeight: content.height
            contentWidth: content.width
            Rectangle {
                id: content
                width: flickable.width + 50
                height: flickable.height + 50
                color: "blue"
                opacity: 0.5

    How i can hide content item outside flickable area?

    Visual illustration:

    !http://s2.postimage.org/kbnthpaeh/Flickable.png(Flickable example)!

  • Hi,

    You should be able to solve this by setting clip: true on the Flickable (clipping is off by default).


  • Michael, thank you.
    Problem solved!

Log in to reply