Hello everyone! I’m trying to set up over my main window translucent darkened “glass” like lightbox or something like that.
Ok, I reached this by this code:
QFrame *f = new QFrame;
f->setFrameStyle(QFrame::Box | QFrame::Plain);
f->setWindowOpacity(0.5);
f->setGeometry(this->geometry());
f->setWindowFlags(Qt::FramelessWindowHint);
f->setLineWidth(200);
f->show();
Result:
But now frame is like another window:
Ofcouse it will not resize and move with my main window. If I will set this-parent in constructor of QFrame it will be incorrect result:
What I can do with this to reach my goal?
↧