Using resistve touch on Qt for Device Creation 5.9

Using resistive EDT touchscreens with a Qt for Device Creation 5.9 image on Colibri iMX6 works to some degree, but axis are swapped and the mouse pointer is stuck on the top right corner.

There are several similar questions but none of these seem to work completely:

First you need to tell Qt apps to use libts. Than you should disable input from Qt’s evdev and libinput.
To do all above just add line listed below to /etc/appcontroller.conf

env=QT_QPA_GENERIC_PLUGINS=tslib
env=QT_QPA_EGLFS_TSLIB=1
env=TSLIB_TSDEVICE=/dev/input/touchscreen0
env=TSLIB_CALIBFILE=/etc/pointercal
env=QT_QPA_FB_DISABLE_INPUT=1
env=QT_QPA_EGLFS_NO_LIBINPUT=1

Last step is to run ts_calibrate.

Please do not create duplicated entry.