Originally Posted by
anda_skoa
Dimming the parent window is usually done by the system's compositor.
So it looks like the compositor does not detect the general QDialog as a (modal?) sub window but does so with the QMessageBox.
Cheers,
_
But it works with Desktop. The background is darkened on Desktop when a dialog pops up. I also pass the parent object to constructor , so there should be no problems with parental relations. This is my test code:
d2->setModal(true);
d2->setFixedSize(200,200);
d2->setPalette(Pal);
label->setText("Hello Putin");
d2->exec();
QDialog *d2;
d2=new QDialog(this);
d2->setModal(true);
d2->setFixedSize(200,200);
QPalette Pal(palette());
Pal.setBrush(QPalette::Window,QColor(255,255,200,128));
d2->setPalette(Pal);
QLabel *label;
label=new QLabel(d2);
label->setText("Hello Putin");
d2->exec();
To copy to clipboard, switch view to plain text mode
Only doesn't work with Android. Should I report this as a bug ?
Bookmarks