Important: Please read the Qt Code of Conduct -

Simulations component press

  • I have two items on my app a joystick and a rectangle with 4 buttons. And i am handling the onPressed events of these items separately and they have their own logic. The problem is i cant press the button when i am moving the joystick. Any idea / suggestions to overcome this issue


  • Moderators

    hi @DonBrowny ,
    I think you'll need a multipointtoucharea

    I belive a normal mousearea simulates a mouse event, and you can't click on multiple elements simultaniously with a single mouse :)

  • hi @J-Hilk thx for your suggestion, i went through the documentation of multipointtoucharea but was unable to get how to implement the touchpoint in my scenario. This qtquick-touchinteraction example gave a rough idea about it, will try it and let you know :)

  • Hi @J.Hilk I have used the below sample code to attain multi-touch for two joystick but i ends up with a blank screen.. am i missing something

    Window {
      id: window
      visible: true
      width: 480
      height: 640
      color: "#F26E55"
      title: qsTr("Hello World")
          maximumTouchPoints: 3
          anchors.fill: parent.fill
          touchPoints: [
                  property QtObject leftstick: Joystick{
                      anchors.topMargin: 8
                      anchors.left: parent.left
                      anchors.leftMargin: 8
                  id: rightTumb
                  property QtObject rightstick: Joystick{
                      anchors.bottom: parent.bottom
                      anchors.bottomMargin: 8
                      anchors.left: parent.left
                      anchors.leftMargin: 8

Log in to reply