Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

QFrame and QMainWindow

$
0
0
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?

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>