Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. The Curious Case of Benjamin Y-axis Button
Forum Updated to NodeBB v4.3 + New Features

The Curious Case of Benjamin Y-axis Button

Scheduled Pinned Locked Moved QtonPi
tslib
2 Posts 2 Posters 1.0k Views 2 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
    Mr-miky
    wrote on last edited by Mr-miky
    #1

    I came across a strange behavior of QT5 on raspberry.
    I'm using a TFT display with resistive touchscreen on a raspberry pi 2.
    The external display is configured as a frame buffer /dev/fb1 while, as usual, monitor is /dev/fb0.
    The touchscreen is /dev/input/touchscreen but is a link to /dev/input/event3.
    I made a stupid application with a few sliders, button etc but does absolutely nothing except exiting the application when quit is pressed.
    There are also two QLCDNumber indicating the x, y coordinates of the pointer.
    I start the application with -platform linuxfb: fb=/dev/fb1 -style fusion -plugin tslib
    Tslib is calibrated and with environment set correctly.
    When I launch, the application is displayed correctly but if I interact via touchpanel you'll immediately notice that something is wrong.
    In framebuffer coordinates 0.0 are top, left and in fact the graphics are correct.
    Unfortunately QtLcd 2 show that the coordinates 0,0 for the touch panel are bottom, left.
    I recalibrated the tslib and tried various tslib tools and is entirely correct, but always in Qt the y-axis still reversed.
    After 1 week of attempts I decided to try to use the framebuffer /dev/fb0 to see if the same happens and magically the application works with the y-axis in the right direction using the calibrated touchplanel.

    After another week of trial, while looking at the sources in QTBase, I have found a variable QT_QPA_FB_TSLIB and after setting it to 1 the y-axis is back in the right direction using properly tslib and now everything works even using /dev/fb1 (I obviously omitted -plugin tslib from the command line)

    I have the impression that there is a bug in Qt5.5 that makes "-plugin tslb" functions only on the framebuffer 0 or that, I do not know why, goes wrong for /dev/fb1.

    Does anyone have experience about this oddity ??

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

      Hi and welcome to devnet,

      Something strange for sure. The implementation of the Linux framebuffer integration has changed quite a bit in 5.5. You should take a look at the bug report system to see if it's something known.

      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