[SOLVED] Widet and menu transparency on windows 7
-
wrote on 21 Apr 2013, 06:02 last edited by
Menu transparency doesn't seem to work on windows.
@
QApplication a(argc, argv);
QMenu menu;
menu.addAction("about", &a, SLOT(aboutQt()));
menu.addAction("exit", &a, SLOT(quit()));
menu.setWindowFlags(Qt::FramelessWindowHint);
menu.setAttribute(Qt::WA_TranslucentBackground);// this
menu.setStyleSheet("QMenu{background:rgba(255, 0, 0, 20%);}");
// or this
menu.setWindowOpacity(0.2);
// doesn't workmenu.popup(QCursor::pos());
@
Brings up a solid black box. When I move the cursor through it, it becomes what is expected (some alpha), but quickly becomes opaque when I run the cursor through it a few times.To put this in perspective, I'm trying to display an openGl window in my Qt app. I'd like menus (and perhaps other widgets) drawn over the openGl window to be see-through so that the openGl scene doesn't get fully obscured.
Any ideas?
-
wrote on 26 Apr 2013, 06:05 last edited by
In case anyone runs into this, it got fixed when I uninstalled and installed it again from source configuring to use nmake rather than MinGW.
1/2