qt and tslib configuration



  • Hi,

    I have problem with my application in qt5. I am using an RaspberryPi 2 with touchscreen 4dpi-32. The touch screen was correctly installed. I can properly run ts_calibrate. If I run my app in linuxfb, the app don’t response on click on button.

    Input for touchscreen is event2

    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = myapp
    TEMPLATE = app

    DEFINES += QT_DEPRECATED_WARNINGS

    SOURCES +=
    main.cpp
    mainwindow.cpp

    HEADERS +=
    mainwindow.h

    FORMS +=
    mainwindow.ui

    My script:

    export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb1
    export QT_QPA_FB_TSLIB=1
    export TSLIB_TSEVENTTYPE=INPUT
    export TSLIB_CONSOLEDEVICE=none
    export TSLIB_FBDEVICE=/dev/fb1
    export TSLIB_TSDEVICE=/dev/input/event2
    export TSLIB_CALIBFILE=/etc/pointercal
    export TSLIB_CONFFILE=/etc/ts.conf

    cd /home/pi/myapp
    ./myapp

    Tha app run with mouse and keyboard properly



  • have you add "LIBS += -lts" in your pro file?


Log in to reply
 

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