Issue with WA_TranslucentBackground again
-
Hi there,
For many days now I have tried to have a window with a transparent background by using "WA_TranslucentBackground". But it did not work neither on Qt 4.8 or Qt 5.1.1 . When I use it the background stays black. Here is the code:@#include <QtGui>
#include "mainwindow.h"
#include "ui_mainwindow.h"MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
setAttribute(Qt::WA_TranslucentBackground, true);
ui->setupUi(this);
}MainWindow::~MainWindow()
{
delete ui;
}
@the code
@setStyleSheet("background: transparent;");
@
doesn't work too and gives the same result.Please someone knows what is wrong or at least has an application working with "WA_TranslucentBackground" or "setStyleSheet("background: transparent;")" ?
NB: I am working on Windows Xp but both codes work well on Linux. In addition this problem seems recurrent and many bug reports and threads exist concerning "WA_TranslucentBackground" but without any solution. I am wondering if the Digia's staff is working on it.