Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

-platform Linuxfb and bad color



  • Hi,
    I use Rpi 4 with 2020-05-27-raspios-buster-armhf (raspberrypi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux).
    I wanted to develop a small qt program, a simple example with 1 label and 1 button.
    If I launch the program in the graphic enviroment it is ok.
    But without X enviroment (before I stop it with sudo systemctl stop lightdm) and with -platform linuxfb options, my program not uses color.
    I attach 2 images.

    I changed also /boot/config.txt option dtoverlay=vc4-fkms-v3d on/off
    ON
    mode "1920x1080"
    geometry 1920 1080 1920 1080 32
    timings 0 0 0 0 0 0 0
    accel true
    rgba 8/16,8/8,8/0,0/0
    endmode

    Frame buffer device information:
    Name : DRM emulated
    Address : 0
    Size : 8294400
    Type : PACKED PIXELS
    Visual : TRUECOLOR
    XPanStep : 1
    YPanStep : 1
    YWrapStep : 0
    LineLength : 7680
    Accelerator : No

    OFF
    mode "1824x984"
    geometry 1824 984 1824 984 32
    timings 0 0 0 0 0 0 0
    rgba 8/16,8/8,8/0,8/24
    endmode

    Frame buffer device information:
    Name : BCM2708 FB
    Address : 0x3e4e0000
    Size : 7179264
    Type : PACKED PIXELS
    Visual : TRUECOLOR
    XPanStep : 1
    YPanStep : 1
    YWrapStep : 0
    LineLength : 7296
    Accelerator : No

    but nothing change ...
    Do you have tips?
    con.jpeg
    senza.jpeg



  • I did further tests and found that:

    1. the background color for widgets is black but I can change with css
    2. the border are missing in new QDialog object.

    a incorrect Qt configuration?



  • SOLVED:
    By setting the QT_DEBUG_PLUGINS variable and launching the program it shows the list of available plugins, styles included.
    The program uses, by default, the style bb10dark.
    Using the parameter -style bb10bright (or cleanlooks, cde, plastique) the application has the correct colors.
    Example :
    ./my_test_program -platform linuxfb -style cde


Log in to reply