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. QT Application development with 2 touch screen displays
QtWS25 Last Chance

QT Application development with 2 touch screen displays

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 1.2k Views
  • 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.
  • A Offline
    A Offline
    Am N
    wrote on last edited by
    #1

    Hi All,

    I am trying to develop an application for an embeded device that has 2 touch enabled LCD screens. The kernel exposes the 2 touch screens with 2 frame buffer drivers (/dev/fb0 and /dev/fb1) and 2 touch devices (/dev/input/even0 and /dev/input/event1). I am able to run the QT application either of the LCD screens using scripts below:

    export TSLIB_TSEVENTTYPE=INPUT
    export TSLIB_TSDEVICE=/dev/input/event0
    export TSLIB_CALIBFILE=/etc/pointercal
    export TSLIB_CONFFILE=/etc/ts.conf
    export TSLIB_PLUGINDIR=/lib/ts
    export TSLIB_FBDEVICE=/dev/fb0
    export TSLIB_CONSOLEDEVICE=none
    export TSTS_INFO_FILE=/sys/devices/virtual/input/mice/uevent
    export QWS_MOUSE_PROTO=tslib:/dev/input/event0

    or

    export TSLIB_TSEVENTTYPE=INPUT
    export TSLIB_TSDEVICE=/dev/input/event1
    export TSLIB_CALIBFILE=/etc/pointercal_1
    export TSLIB_CONFFILE=/etc/ts.conf
    export TSLIB_PLUGINDIR=/lib/ts
    export TSLIB_FBDEVICE=/dev/fb1
    export TSLIB_CONSOLEDEVICE=none
    export TSTS_INFO_FILE=/sys/devices/virtual/input/mice/uevent
    export QWS_MOUSE_PROTO=tslib:/dev/input/event1

    While starting the QT Application I pass the appropriate LinuxFb so that the application is started on that specific framebuffer
    I now have 2 questions:

    1. How do I allow the user to dynamically switch the application from one screen to other (i.e. how to switch the frame buffer device that the qt application is painting to without respawning the application)

    2. How do we pass appropriate environment variables to QT App so that it uses the appropriate touch screen? For e.g. QT App running on screen 1 should use event0 and the one running on screen 2 should use even1

    Thanks in advance for any help.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What version of Qt are you using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Am N
        wrote on last edited by
        #3

        @SGaist said in QT Application development with 2 touch screen displays:

        What version of Qt are you using ?

        It's 4.8.7.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          See the Qt Embedded Running chapter in Qt 4 documentation. You'll see how you can manage multiple displays.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Am N
            wrote on last edited by
            #5

            Thanks much for the input. This was exactly what I was looking for. The link talks about handling multiple displays. How do we handle multiple touch drivers? Any document for the same?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              I am don't remember such a document. There is Qt for Embedded Linux Pointer Handling, but I don't think it will answer your question.

              You can have multiple type of inputs used at the same time but I don't remember if you can have multiple device of the same type at the same time. However, I do remember that you may have one device that output all the outputs generated by the other input devices. Do you have something like that in your /dev ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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