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 8572035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:54:55+00:00 2026-06-11T18:54:55+00:00

As told here Qt: Erase background (Windows Aero Glass) , I’m using WA_TranslucentBackground to

  • 0

As told here Qt: Erase background (Windows Aero Glass), I’m using WA_TranslucentBackground to have a glass background on my QMainWindow: on Windows 7 (Aero enabled) it works well, but on Linux (KDE4) I get a black background, I haven’t tried on a PC with Aero disabled, or maybe older than Vista.

Is there a way to check if Aero is available and enabled, so I can set WA_TranslucentBackground only if it’s enabled, and keep the standard background on Linux and Windows without Aero?

It seems that Windows API’s DwmIsCompositionEnabled does the job, but I cannot find how to call it from Python, also taking in account that it may not exist on pre-Vista versions.

  • 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-11T18:54:56+00:00Added an answer on June 11, 2026 at 6:54 pm

    You can try something like the following. It should handle being run on non-Windows platforms, and also the absence of the DwmIsCompositionEnabled function:

    import ctypes
    
    def is_aero_enabled():
        try:
            b = ctypes.c_bool()
            retcode = ctypes.windll.dwmapi.DwmIsCompositionEnabled(ctypes.byref(b))
            return (retcode == 0 and b.value)
        except AttributeError:
            # No windll, no dwmapi or no DwmIsCompositionEnabled function.
            return False
    

    On my Windows 7 machine, this returns True.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know people often get told off here for using regexes to fiddle with
as i told here i am using NSNotificationCenter . on class A (observer) on
I'm confused about how IO#select works in Ruby. I'm told here that it should
Fairly new to Jquery here.... but one thing I have been told and being
Im very very new to python, I'm using it here as Im told it's
I have developed a Spring MVC - Hibernate application as told here . Now
In my previous question ( here ), I was told I have to redirect
I was told that using break and continue labels in an OOP language is
A consultant told me recently that he has clients using IIS. Those servers accept
I have been told I will be let go at the end of the

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.