Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8505813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:25:33+00:00 2026-06-11T02:25:33+00:00

I am working on a touchscreen GUI for an embedded Linux device that will

  • 0

I am working on a touchscreen GUI for an embedded Linux device that will sit over a video feed. Therefore, I need my GUI to be transparent and disappear after some timeout so the user can just view the video feed. The main.cpp of my GUI ensures that the background of the entire application running with the -qws option is transparent with the following code:

QApplication a(argc, argv, QApplication::GuiServer);
QWSServer::instance()->setBackground(QBrush(Qt::NoBrush));
QWSServer::setCursorVisible (false);

I have a main, bottom level widget that owns every other widget in the GUI. I set the background to transparent with the following pallete related code.

QPalette transparentPallete;
transparentPallete.setColor(QPalette::Window, Qt::transparent);
setAutoFillBackground(true);
setPalette(transparentPallete);

I also overrode the paintEvent method to try to ensure that the background would always be in a clean transparent state:

void MainWidget::paintEvent(QPaintEvent *event)
{
    QPainter p(this);

    // Fill background
    p.setPen(Qt::NoPen); // no outlines
    p.fillRect(0,0,width(),height(),QColor(255, 255, 255, 0)); // Fill rectangle with color

}

Now I can launch my application and view my GUI over the raw video feed and I can interact by touch to bring up different windows within the GUI and have them disappear.

What I cannot accomplish is to get rid of artifacts that are left behind when I hit ‘cancel’ or order certain portions of the GUI to disappear. These artifacts look really ugly ( multiple vertical lines / wrong colors ) and only disappear when another part of the GUI is summoned that replaces that location on the screen. They are there regardless of whether I have the video feed enabled ( which lives on a different overlay controlled by the processor dss anyway ).

How can I get rid of these artifacts that are left behind after dismissing some widgets?

NOTE: This definetly is correlated with the following line:

QWSServer::instance()->setBackground(QBrush(Qt::NoBrush)); // Allows transparent pixels to be written to frame buffer

If I turn this line off, I cannot see the underlying overlay but I also do not get any strange behavior whatsoever and my performance becomes much better. How can I achieve transparency but also lose the strange artifacts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:25:34+00:00Added an answer on June 11, 2026 at 2:25 am

    Well the following has an issue apparently:

    QWSServer::instance()->setBackground(QBrush(Qt::NoBrush));
    

    But this solves the problem and I see 0 artifacts:

    QWSServer::setBackground(QBrush(QColor(0, 0, 0, 0)));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on an html5 app for a touchscreen windows xp computer that will be
Working with an API where I need to send a value over in an
I'm working on a webapp that's designed for use on large touchscreen monitors. It
I'm working on a WinCE 6.0 system with a touchscreen that stores its calibration
I am stuck in a situation. I am working on an embedded device (based
Working with an undisclosed API, I found a function that can set the number
Working on game where plates will be falling from top to bottom. Some plates
I have been working on a touch screen application. I need to know if
I am working on a touch screen on a small device and the custom
I am working on a project built in WPF, which includes an embedded WebBrowser.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.