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. Simulations component press
Qt 6.11 is out! See what's new in the release blog

Simulations component press

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 1.2k 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.
  • D Offline
    D Offline
    DonBrowny
    wrote on last edited by
    #1

    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

    0_1522129727334_Screenshot_2018-03-27-11-15-21-683_org.qtproject.example.png

    J.HilkJ 1 Reply Last reply
    0
    • D DonBrowny

      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

      0_1522129727334_Screenshot_2018-03-27-11-15-21-683_org.qtproject.example.png

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      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 :)


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      D 1 Reply Last reply
      1
      • D Offline
        D Offline
        DonBrowny
        wrote on last edited by
        #3

        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 :)

        1 Reply Last reply
        0
        • J.HilkJ J.Hilk

          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 :)

          D Offline
          D Offline
          DonBrowny
          wrote on last edited by
          #4

          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")
          
            MultiPointTouchArea{
                maximumTouchPoints: 3
                anchors.fill: parent.fill
                touchPoints: [
                    TouchPoint{
                        id:leftTumb
                        property QtObject leftstick: Joystick{
                            anchors.top: parent.top
                            anchors.topMargin: 8
                            anchors.left: parent.left
                            anchors.leftMargin: 8
                         }
                    },
                    TouchPoint{
                        id: rightTumb
                        property QtObject rightstick: Joystick{
                            anchors.bottom: parent.bottom
                            anchors.bottomMargin: 8
                            anchors.left: parent.left
                            anchors.leftMargin: 8
                         }
                    }
                ]
            }
          }
          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