Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

ScrollView different behaviour on Windows and Android



  • Hello,

    I have problem with impelementing ScrollView component for my cross-platform application.

    The problem is I have different behaviour on desktop and on mobile.

    ScrollView
    {
        id: textScroll;
        anchors.fill: parent
        clip: true
    
       ScrollBar.horizontal.policy: ScrollBar.AlwaysOff;
    
    
       TextArea 
       {
              width: parent.width;
               height: contentHeight;
               wrapMode: TextEdit.Wrap;
         	   readOnly: true;
              horizontalAlignment: Text.AlignJustify;
            text: "  long bla bla"
       }
    }
    
    

    For Desktop, the behaviour is corretly, I can scroll text only vertical.
    For Android when i'm touching screen I can dragg text outside the ScrollView Area invertical and horizontal.

    I know that according to documentation the behaviour is ok https://doc.qt.io/qt-5/qml-qtquick-controls2-scrollview.html
    but how can I handle this for mobile? I just wanta scroll this component instead of dragging it and I can't find any usefull property for that component for this case.


Log in to reply