Hi all,

I have a problem with opening a semi-transparent QDialog.

I have a QMainWindow with a centraWidget in it. This centralWidget has a QPushButton, that shall open a non-transparent QDialog, which also has a QPushButton. This QPushButton shall open a semi-transparent QDialog. When I do the following...

Qt Code:
  1. QDialog1::QDialog1(QWidget *parent) :
  2. QFrame(parent),
  3. ui(new Ui::QDialog1)
  4. {
  5. ui->setupUi(this);
  6. this->setWindowFlags(Qt::FramelessWindowHint);
  7. this->setAttribute(Qt::WA_NoSystemBackground);
  8. this->show();
  9. }
  10.  
  11. void QDialog1::on_pushButton_clicked()
  12. {
  13. Dialog2 *dial = new Dialog2(this);
  14. }
To copy to clipboard, switch view to plain text mode 

...it opens the inner QDialog as a semi-transparent one, BUT with the "this" it is a child of the first QDialog and is opened within the first QDialog. But I want it to be opened in the centralWidget. So I tried the same thing without the "this", but in this case, it opens the inner QDialog with a black non-transparent background.

I just want to open the inner QDialog over all other QWidget (like a Popup).

Does anybody can help?

Thank you.