How can I create a transparent window in Qt for Linux. I tried the following, but it doesn't work:
myWidget::myWidget(QWidget *parent) : QWidget(parent, Qt::FramelessWindowHint) {
setWindowOpacity(0.4);
}
"Note that under X11 you need to have a composite manager running, and the X11 specific _NET_WM_WINDOW_OPACITY atom needs to be supported by the window manager you are using."
http://doc.qt.nokia.com/4.7/qwidget.html#windowOpacity-prop
What window manager are you using? http://en.wikipedia.org/wiki/Compositing_window_manager#List_of_compositing_window_managers
Does your server support the "Composite extension"? http://en.wikipedia.org/wiki/Composite_(graphics )
Does your card support it?
I had a similar issue but on windows, not sure if it will help in Linux Instead of Qt::FramelessWindowHint use Qt::SplashScreen. I can have a frameless and transparent window on top of my other widgets.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.