Transparency Qt5.1.1



  • Hello,

    I'm unable to create a Qt application with a transparent background window. I'm using Qt5.1.1 (qt-everywhere-opensource-src-5.1.1.tar.xz) running on Ubuntu, using Metacity as the window manager with the '--composite' option set.

    I've written a sample application, this works as expected when built against Qt4 libraries, however when I build this against Qt5 libraries and run it in the same environment I get a black background instead of transparency.

    Can anyone provide a very simple application that renders a QLabel with a transparent background such that windows beneath can be seen?

    I've searched the forums, but had no success, my current attempts include using setStyleSheet to set a transparent background, setting the Qt::WA_NoSystemBackground, Qt::WA_TranslucentBackground attributes and using the Qt::FramelessWindowHint window flags.

    Thanks,

    Andrew Murray


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.