Hi I have a transparent dialog box (windowOpacity = 0.5) and I have another dialog box who is (and has to be) child of this dialog.
Is this possible to have full opacity just for that control? I know if I don't make it as child of the previous dialog, it does have full opacity but the reason why i want that to be child is because the parent is in full screen mode and I don't want any bars (for example unity bar in ubuntu) to display when modal dialog is shown as "orphan". I have tried following:
//CODE IN PARENT CONSTRUCTOR
dlgChild = new Dialog(this);
dlgChild->setModal(true);
dlgChild->setWindowFlags(Qt::WindowStaysOnTopHint);
dlgChild->setWindowFlags(Qt::FramelessWindowHint);
for (int i = 0; i < dlgChild->children().size(); i++) {
QObject* child
= dlgChild
->children
().
at(i
);
static_cast<QWidget*>(child)->setWindowOpacity(1);
}
dlgChild->setWindowOpacity(1);
dlgChild->show();
//CODE IN PARENT CONSTRUCTOR
dlgChild = new Dialog(this);
dlgChild->setModal(true);
dlgChild->setWindowFlags(Qt::WindowStaysOnTopHint);
dlgChild->setWindowFlags(Qt::FramelessWindowHint);
for (int i = 0; i < dlgChild->children().size(); i++) {
QObject* child = dlgChild->children().at(i);
static_cast<QWidget*>(child)->setWindowOpacity(1);
}
dlgChild->setWindowOpacity(1);
dlgChild->show();
To copy to clipboard, switch view to plain text mode
Bookmarks