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

Mouse Click and keypressed not working in the Pathview



  • Hi All,
    Below is the code snippet I am trying. But, Mouseclick/keypressed nothing is working. Am I doing anything wrong here? Please suggest.
    import QtQuick 2.7
    import QtQuick.Controls 2.3

    import QtQuick 2.0

    Rectangle {
    id: root
    property string keyboardinput: "wxyz"
    width: 240; height: 200
    MouseArea {
    anchors.fill: root
    onClicked: {
    root.keyboardinput = "abcd";
    }
    }
    Component {
    id: compDelegate
    Text {

                  text: root.keyboardinput
              }
    

    }

     PathView {
      anchors.fill: parent
         delegate: compDelegate
          model: ListModel {
    ListElement {
        name: "Bill Jones"
        //icon: "pics/qtlogo.png"
    }}
         
         path: Path {
            startX: 120; startY: 100
            PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 }
            PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 }
        }
     }
    

    }


Log in to reply