Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to start with a touchscreen device programming in QT
Forum Updated to NodeBB v4.3 + New Features

How to start with a touchscreen device programming in QT

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 4 Posters 3.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.
  • T Offline
    T Offline
    tarunb
    wrote on last edited by
    #1

    how to check weather their are available touchscreen drivers for the device support for Qt.

    enum QTouchEvent::DeviceType :- is this value need to be set by programer or directly set from kernel

    Qt::TouchPointStates :- how are these states taking input?

    how can we handle QEvent for touch?

    1 Reply Last reply
    0
    • GianlucaG Offline
      GianlucaG Offline
      Gianluca
      wrote on last edited by
      #2

      At the moment the best way of creating GUIs is using the QtQuick system.
      There are a lot of reason for using QtQuick, but concerning your question, with QtQuick the handling of touchscreen is very straitghforward and easy !!

      Take a look of this starting guide:
      http://download.qt-project.org/learning/developerguides/qtquickappdevintro/

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        Gianluca this is not what OP is asking about. Both QtWidgets and QtQuick work with touch screens, but tarunb is more or less asking how to detect the presence of a touch device.

        (Z(:^

        1 Reply Last reply
        0
        • GianlucaG Offline
          GianlucaG Offline
          Gianluca
          wrote on last edited by
          #4

          Yes, ok ... but I suppose that the final purpose of detecting a touch device is to enable the using of touches gestures and/or multitouch event, etc.

          But with QtQuick all this checking are superflous because:

          • in the scenario where your app does not need a multi-touch handling and/or touch gesture, you can simply use "MouseArea" that works automatically for mouse clicks and for touches (depend on the capabilities of the device) - So, you don't need to check if the device can accept touches or not, QtQuick does it for you
          • in the scenario where your app need multi-touch handling and/or touch gesture, then you add a "MultiPointTouchArea" to use in combination with "MouseArea" and in this case, the "MultiPointTouchArea" will works when touches are possible and allow to handle gestures and multi-touches event when the device allow that - Again, you don't need to explicity check if the device can accept multi-touches or not, QtQuick does it for you

          That's my long answer. Maybe now is more clear my point :-)

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cfg83
            wrote on last edited by
            #5

            Hello -

            I have a question. If we are using QtQuick 2.0 + Qt 5 on Wayland in a tablet, should we expect the application to "just work"? Is it possible that the Qt 5 on Wayland may not hook up to the touch screen correctly?

            Thank You,

            cfg83

            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