Cross compile Qt 5.3 on Olinuxino a20, inverted x-axis problem

  • Hi all,
    I have an Olinuxino-Micro with the official Olimex Debian image (release 7). Mali libraries installed. I have cross compiled qt 5.3.2 on my host. I can build and deploy apps from my host with no problems and qt apps works well on my board. I'm using the 10' touchscreen by olimex.

    I use eglfs platform (for fullscreen)
    I run apps with " -plugin evdevtouch:/dev/input/event0" (without this parameter the touch doesn't work).
    Tslib is installed and working (i can run ts_calibrate with no problems) (btw wt5.3 uses evdev by default).

    Now the problem is that the x-axis is inverted, if the app has a button on the left i have to press on the right of the screen.
    I googled this problem and i found it's an evdev problem but i can't figure out how to solve it.
    I tried adding the option invertx but nothing changed.
    I tried also with -plugin Tslib but it doesn't work (because there is no tslib plugin in qt plugins directory)

    Can someone help me?
    Thanks in advance

    PS. Sorry for my english

  • So...anyone can help me?
    If there is no solution for "fix" evdev, how can i compile Qt5.3 with tslib plugin?

  • There are environment variables you can use to rotate the touch coordinates:
    On some touch screens the coordinates will need to be rotated. This can be enabled by setting QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS to rotate=180.
    But I haven't seen anyting for mirror image.

    Check out the other options at

  • Hi, thank you for your answer. I've already tried that variable with rotate=180 but it only blocks the touchscreen. So, no touches detected.
    Now i'm trying to follow this discussion
    to add tslib support, but i don't know if it's the right way.

  • Hi,

    I have the same problem as you do. It is really anoying and the answer doesnt exists. I spend couple of days of trying to fix this. I can calibrate touchscreen on X11 using xinput, but not for eglfs platform. Only one nasty solution I found and using is to rotate the application using "transformation : Rotation", than touches works fine. But the solution is not good for me, because I would like to rotate display using Linux Kernel command to be the way I want and then just swap axis for touch in application...

    If you find the solution, please let me know.

  • Hi Satiriasis,
    The only solution i've found is to disable evdev and use Tslib.
    Qt5 and > does not build Tslib plugin by default, you have to use -Tslib option during the configure command. After that you have to run an application using "-plugin Tslib". You have also to disable evdev setting QT_QPA_EGLFS_DISABLE_INPUT environment variable to 1.
    This is the way i solved.

  • Thanks for advice, I was also dealing with tslib, but there I was unable to run ts_calibrate or any ts_ lib. I have set that up correctly, I was working with Tslib before with couple of different ARM boards -correctly exported all variables, uncommented module_input in configuration, also crosscompiled tslib plugin to QT ... I have even tried to compile couple of different versions of tslib without success... Strange was, that ts_calibrate was running and just did not receiving any touch event, but when I try events in evtest or use evdevtouch, than it works ... I will give a try to tslib couple of other hours...

    Such a huge framework and they do not create working variable for swapping axis?

  • Ye i couldn't find another solution.
    Do you have "mirrored x" or "rotated x"? i mean, if you have a MouseArea on the bottom left corner where do you have to touch? bottom right? or top right? i'm asking this because i read that many people have rotated x problem and they only needed to set an evdev environment variable to solve that problem.

    The only thing about Tslib that i can say is that installing the offical Debian image by Olimex on my board, Tslib is already installed and working (both ts_calibrate and ts_test work good).

    If your ts_calibrate was running but not receiving touch events maybe you set up the wrong input device?
    Have you ever check in "dev/input" what is your touchscreen name? just make cat /dev/input/eventX , where X is a number. Mine is 0.

    I'm sorry if i can't give you a solution, i've also lost so much time on this problem because no one could give me a right tip.

  • Yes, tell me about that.... I spent around 5 full days with evdevtouch and before about a month with tslib. I was even trying to rewrite Qt libraries and with that I was able to recalibrate and maybe I will do some patch for it in future when I find a time doing that, the code for qevdevtouch is in /qtbase/src/platformsupport/qevdevtouch.cpp. There is even the function which should get rotated argument from exported environment, so far I was looking into the code, I don't see there a problem... But it will be horrible to deal with it, because all the time I would recombile evdevtouch plugin, I have to put it on the board to test the results...

    I am having probably rotated x,y? - for the button on upper right corner, I have to touch down-right. Button on the left upper corner I cannot touch - maybe I am out of coordinates, because they are swapped. I am also having a listview in app and for scrolling down, I have to slide on a screen from right to left, so somehow axis seems to be swaped (y is insted of x) ...

    When I export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS="rotate=180", than it simply doesnt receive any signals from touch...

    Yes, regarding tslib, I am sure, that I have exported right input - when I do "cat" for that exported device, I am receiving touch inputs...

    I appreciate your advice, I will go to fight with this issue more, but I am really loosing a patience now... :(. Someone from QT should look on this issue, because I thing it is pretty serious...

  • Ye that's really an annoying problem, i know your feeling.
    When i was using that rotate parameter my screen didn't receive any signal too. That was my last try with evdev and i switched to Tslib. I'm only lucky Tslib was already installed on my Debian image.
    Anyway, imho, i think it's easier to build and install Tslib rather than try to configure evdev.
    In your place i wold try to re-do all from beginning. I mean, i'm using an Olinuxino board with an SD card for boot, i would re-do my SD card, install the OS and try to build and configure tslib right on the board. I don't think it's a long process so i don't think you need to cross compile tslib. Just after that cross compile Qt with the -Tslib option.
    I'm just trying to give some advices but i'm not so expert with these things.

  • Yataaaaaaaaaaaaaaaaaaaaaaaaaaa I have the solution!!! When I was looking now to the code of qevdevtouch, I figure out, that there is a bug, it takes rotate parameter directly from the line, so when you start you application like that : " ./myApp -platform eglfs -plugin evdevtouch:/dev/input/event1:rotate=90 - or whatever your rotation is, than it works!! I just tested it.

    In a code there is split for ":" and checks for other argument parameters instead of using environment par.

  • :D
    I'm happy you solved your problem!!! ;)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.