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. [SOLVED] problem with Qt and tslib
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] problem with Qt and tslib

Scheduled Pinned Locked Moved Mobile and Embedded
19 Posts 2 Posters 10.8k 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.
  • M Offline
    M Offline
    mostafanfs
    wrote on last edited by
    #6

    I corrected ts.conf file path in TSLIB_CONFFILE variable. It was pointing to a wrong place. Although it didn't solve my problem!

    Ok. How to calibrate tslib? When I run ts_calibrate binary file in the target terminal nothing happens. First question: Is it normal?
    Second: Do I have to edit some header or config file to calibrate tslib instead of running ts_calibrate?

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

      You should see a calibration GUI appearing on your device's screen

      No header needed, the calibration process of tslib generate the configuration files you'll use later on

      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
      • M Offline
        M Offline
        mostafanfs
        wrote on last edited by
        #8

        Well that's another problem. When I type ts_calibrate it says in terminal :

        @tslib: Selected device is not a touchscreen (must support ABS_X and ABS_Y events)@

        And a GUI shows up but it doesn't accept my finger when I touch that spot I'm supposed to touch.
        Any Idea?

        Less important question!: Why do I have to calibrate it anyway?

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

          What touchscreen are you using ?

          For the less important question:
          Different hardware setup ?

          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
          • M Offline
            M Offline
            mostafanfs
            wrote on last edited by
            #10

            Fair enough !
            I'm pretty sure it's: ft5x0x_ts
            I saw it by "cat /proc/bus/input/devices"

            Can I edit tslib sources so it wouldn't give that error?

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

              IIRC, there was a catch between that device and tslib, I don't rememberer all the details, but if you search for the two together you should find some infos.

              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
              • M Offline
                M Offline
                mostafanfs
                wrote on last edited by
                #12

                You mean on this site?
                Cause I didn't find very helpful information on net. Seems like other people have or had the same problem too but nobody posted something useful.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mostafanfs
                  wrote on last edited by
                  #13

                  SGaist I have another question. Is there an alternative to tslib?
                  I mean say I never gonna make it with tslib, do I have other options to work with touch screen inside a Qt program?
                  What about Qt5? I was reading this page http://doc-snapshot.qt-project.org/qt5-dev/embedded-linux.html and seems like Qt5 has some options for new multitouch controllers.
                  Another question: How do I know if my board supports Qt5 versions? Can I cross compile a Qt-everywhere-5.2.1 just like the way I did for Qt-everywhere4.7.0 and copy lib folder and stuff?

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

                    IIRC, Qt 5 has the evdev plugin in addition to also support tsllib.

                    What board are you using ?

                    Basically yes, depending on your needs you might have to provide additional libraries in order to fully build Qt 5.

                    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
                    • M Offline
                      M Offline
                      mostafanfs
                      wrote on last edited by
                      #15

                      Dear SGaist I managed to get tslib to work with touch screen controller by modifying controller driver in kernel. Now I can run ts_calibrate successfully and everything seems to be fine.
                      But still Qt doesn't take touch actions. I tried to compile Qt again with some modifications in qmake.conf like:
                      QMAKE_INCDIR +=
                      QMAKE_LIBDIR +=
                      QMAKE_CFLAGS += -I
                      QMAKE_LFLAGS += -L
                      Respectively pointing to tslib Header and Lib directory. But still I can not use touch as an input to compiled Qt demo programs.
                      I added -qt-mouse-tslib and -plugin-mouse-tslib into configure.
                      I've set all necessary environmental variables for Qt and tslib.

                      Please help me. I got too excited after solving controller's problem but now I'm stuck at a point all over again.

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

                        It's not a build problem.

                        tslib is used in a plugin. You have to configure your application to start using the plugin

                        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
                        • M Offline
                          M Offline
                          mostafanfs
                          wrote on last edited by
                          #17

                          Yeah I kind of have the feelings that it has something to do with the environment variables and things like that. But I went based on this page:
                          http://qt-project.org/doc/qt-4.7/qt-embedded-pointer.html
                          Then I don't know what is wrong.
                          Any specific idea?

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

                            Since you talked about both Qt 4 and 5, which version are you currently 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
                            • M Offline
                              M Offline
                              mostafanfs
                              wrote on last edited by
                              #19

                              Ok I figured there was some problems with environment variables. Apparently device name is something else. Now it seems it's working.
                              By the way I meant Qt4.

                              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