Page 1 of 1

Qt5 App Colors Swapped

Posted: Tue Aug 04, 2020 8:17 am
by azure
Hello,

I ran into an issue where the colors in my Qt application have become swapped, where the color red is now blue and blue is now red when displayed on my LCD. This happened after upgrading buildroot-at91 to a newer branch. If I run the prebuilt Microchip planes demo on the newer buildroot the colors are displayed correctly, but when I debug my Qt application and run it on the same hardware the app's colors are swapped when displayed. If I debug my Qt application on the older buildroot-at91 branch the colors are correct. The older home automation demo displays the correct colors on the older buildroot-at91 branch too.

I have also tested the screen on the newer buildroot version with modetest and received the same color pattern displayed within the webpage (link below). So I am confident the hardware is working correctly. I don't know if I am missing a simple kernel or Qt5 config after the switch to the new buildroot-at91 branch.

If anyone has any information on a good place to start or know of a possible fix, your help is appreciated.


Info

Newer Buildroot info
Buildroot-at91 branch 2020.02-at91
Qt5.12.7

Older Buildroot info
Buildroot-at91 branch 2019.05-at91

SOM
SamA5d27

LCD Screen
1024x600
24bit color depth

LCD Pattern Test
modetest - https://www.linux4sam.org/bin/view/Linu ... g_modetest

Re: Qt5 App Colors Swapped

Posted: Tue Aug 04, 2020 1:47 pm
by uvijay
Hi azure,

Try export the below environment data before start of the qt application.

export QT_QPA_FB_DRM_FORMAT=6
export QMLSCENE_DEVICE=softwarecontext
export QT_QPA_FB_DRM=1

Hope this might resolve the issue.

Regards,
Vijay

Re: Qt5 App Colors Swapped

Posted: Tue Aug 04, 2020 9:29 pm
by azure
That fixed it! The colors are displayed correctly now.

Thank you Vijay for your help.