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. Embedded Linux desktop color
Qt 6.11 is out! See what's new in the release blog

Embedded Linux desktop color

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 3.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
    ShawnG
    wrote on last edited by
    #1

    Can anyone help me find out how to change the color of the desktop in the QVFB and target from the default green. Here is the simplest of code to demonstrate:

    @int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    int val = a.exec();
    return val;
    }
    @

    then run ./app -qws

    My qvfb is ran as:

    sudo /usr/local/Trolltech/Qt-x11-4.7.4/bin/qvfb -width 240 -height 320 -depth 15

    Thanks

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      I don't have any experience with Qvfb, but according to the "docs,":http://doc.qt.nokia.com/stable/qvfb.html there is a skin parameter which can be given to the qvfb command line.

      Perhaps editing a skin file could help you out.

      From the docs:

      bq. The qvfb application supports the following command line options:
      ...
      -skin <name>.skin -- The preferred skin. Note that the skin must be located in Qt's /tools/qvfb/ directory.

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

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

        Thanks, but skins affect the QVFB application itself, not the application running in QVFB. The skins allow the QVFB app to look like a cell phone, which is not required for my needs. I need to find out how to change the green background color to some other color. The green is also present on the target hardware, so it really is not a QVFB specific thing, its maybe the -qws server background color.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          ShawnG
          wrote on last edited by
          #4

          I finally figured it out:

          QWSServer::setBackground(QBrush(QColor(0xAD, 0xD8, 0xE6)));

          will set the desktop background to lightblue.

          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