Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT Color issue
Forum Updated to NodeBB v4.3 + New Features

QT Color issue

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 2 Posters 1.9k Views 1 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.
  • S Offline
    S Offline
    Sidii
    wrote on last edited by
    #1

    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 GREEN

    Only 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

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Are you sure your display is OK? Other apps have "normal" colours?

      (Z(:^

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sidii
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          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.

          (Z(:^

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Sidii
            wrote on last edited by
            #5

            Ok Thanks a lot for the information. I will try these two things mentioned by you. Will update this thread soon.

            Cheers
            Sid

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sidii
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Sidii
                wrote on last edited by
                #7

                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.

                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