QT Color issue
-
Dear Members, i built QT 5.2.1 from source for powerpc compatible system. I am facing one strange issue:
RED is appearing as BLUE
GREEN as RED
BLUE as GREEN
YELLOW as MAGENTA
CYAN as YELLOW
MAGENTA as LIGHT GREENOnly BLACK and WHITE colors are behaving correctly.
I am trying to set the background color of QLabel.Kindly let me know if i missed anything during configure command, any parameter/argument or something else.
Thanks
Sid -
Are you sure your display is OK? Other apps have "normal" colours?
-
Hi Sierdzio, thanks for your reply. Actually this device was earlier controlled using PEG library and at that time the display colors were correct. Can you please provide me some hints how to proceed. Currently i have no information about the display lcd that is currently being used.
Same program if i run in my Fedora, it displays correct colors.
I did a cross compilation of QT source code to get the libraries supported for this device running on Windriver linux. In Qt4x, i see that there is one option called -depths 16 to set the color depth to 16 etc...
But i am not able to find such argument/switch in Qt5x when i do ./configure --help
Now i have absolutely no idea what is going wrong.
Thanks
Sid -
Hm, that is out of my comfort zone. All I can say are 2 things: try the newest Qt possible (even the GIT checkout), as I think some support for lower-bit graphics has been added very recently (it might have been too late to be included in Qt 5.3.1). The other is to ask in a place where there are more experts: "interest":http://lists.qt-project.org/mailman/listinfo/interest mailing list.
-
Ok Thanks a lot for the information. I will try these two things mentioned by you. Will update this thread soon.
Cheers
Sid -
Just to cross check, i wrote a simple standalone QT application:
@
#include <QApplication>
#include <QMainWindow>
int main(int argc, char** argv)
{
QApplication app(argc, argv);
QMainWindow* myWindow = new QMainWindow();
myWindow->setGeometry(0,0,800,480);
myWindow->setStyleSheet( "background-color: red;" );
myWindow->show();
return app.exec();
}@
And the background color of myWindow is all BLUE instead of RED.
-
I did some research and found that this RGB color is getting changed to BRG color. (not BGR). It is because of the little endian issue. Powerpc is big endian and frame buffer is little endian.
I have not got any solution to this problem. Will update the thread once i get it.
If anybody got similar issues then please reply.