Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Flickable in SwipeView in Popup cancells overshoot movement on mouse scroll
Forum Updated to NodeBB v4.3 + New Features

Flickable in SwipeView in Popup cancells overshoot movement on mouse scroll

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 286 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S0ulM1keS Offline
    S0ulM1keS Offline
    S0ulM1ke
    wrote on last edited by
    #1

    There is some complex structure that I'm trying to implement. I've tried to reproduce in smaller scale, and issue is the same.
    When you try to scroll whole page down, it cancels overshoot movement. But, only in first try. After this, it overshoots normally.

    At this this reproduction you need to scroll hard to see that movement cancels. In my app this happens constantly, no matter how big page is

    import QtQuick 2.15
    import QtQuick.Controls 2.15
    import QtQuick.Window 2.15
    
    Window {
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
    
        Popup {
            id: pop
    
            anchors.centerIn: parent
            width: parent.width
            height: parent.height
    
            SwipeView {
                anchors.fill: parent
    
                Repeater {
                    model: 6
                    Loader {
                        active: SwipeView.isCurrentItem || SwipeView.isNextItem
                                || SwipeView.isPreviousItem
                        sourceComponent: Flickable {
                            id: flick
    
                            contentHeight: rec.height
    
                            Rectangle {
                                id: rec
                                width: parent.width
                                height: 600
    
                                color: index % 2 ? "#00ff00" : "#ff4500"
                            }
                            ScrollBar.vertical: ScrollBar {}
                        }
                    }
                }
            }
        }
    
        Component.onCompleted: pop.open()
    }
    
    

    Am I doing something wrong?

    1 Reply Last reply
    0
    • S0ulM1keS Offline
      S0ulM1keS Offline
      S0ulM1ke
      wrote on last edited by
      #2

      Update:
      Changing Flickable to ScrollView solved the issue.
      But still it's unclear why this behavior happens with Flickable

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved