Nominate our 2022 Qt Champions!

QWidget has transparent background-color setting display incorrectly under win8.x

  • Hi,

    My friends are working a project with Qt5.x.

    Our program has a main window, then we use code below to create a NewTab on main window
    main window has load a picture as background, and we want the NewTab has a transparent background color so we can see background picture of main window.

    @NewTab::NewTab(QWidget *parent) :
    setStyleSheet("background-color:transparent"); //to set a transparent background color

    These code above works fine when our build running under win xp/vista/7/mac osx 10.7.x~10.9.x
    But when our build running under win8.x, the NewTab is not transparent but fully white.
    If we run our build under win8.x with a compatibility mode of win xp, the NewTab will keep transparent. but that is inconvinient for users.

    This problem appears when we start use Qt5.2.x
    and we tried Qt5.3 few days before, and this problem still bothered us.
    Any good ideas with this problem?

  • Lifetime Qt Champion


    Sounds like it could be a bug. You should have a look at "the bug report system": to see if it's something known. If not, please consider opening a new report providing a simple compilable example that reproduce the behavior.

Log in to reply