Transparent Window in kde
-
Hi
i want to create a window with transparent background.i create it for gnome successfully but in kde some shadow draw around window(you can see it in screen shot around map icon).some guys said you can use QML and QDeclarativeView but i cant use them for some reason.
i found that if you create an image that have some alpha blend and then create a mask for window it disable the window shadow but if you move window something draw on your screen(they are like noise and when the screen update they destroy)!
if you don't understand you can see in my screen shot the window with shadow enable and the other with no shadow.
!http://www.youimages.org/public/images/082755EKG5.png(ScreenShot)!
also my code:@
#include <QtGui/QApplication>
#include "QLabel"int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QMainWindow mainwindow = new QMainWindow();
QLabel mainwidget = new QLabel();
QPixmap pm = QPixmap("/home/bijan/Pictures/Maps.png");
QPixmap maskImage = QPixmap("/home/bijan/Pictures/MapsMask.png");
mainwindow->setMask(maskImage.mask());
mainwindow->setAttribute(Qt::WA_TranslucentBackground);
mainwindow->setWindowFlags(Qt::FramelessWindowHint);
mainwidget->setPixmap(pm);
mainwindow->setCentralWidget(mainwidget);
mainwindow->show();
return a.exec();
}
@ -
closed due to duplicate post from "this thread":http://developer.qt.nokia.com/forums/viewthread/1107/