'WindowStaysOnTopHint' doesn't work for widget 'ww', why?
Dialog w;
widget ww;
ww.setWindowFlags(Qt::WindowStaysOnTopHint);
ww.setWindowFlags(Qt::FramelessWindowHint);
ww.setFixedSize(206,206);
w.show();
ww.show();
Because you are replacing it with Qt::FramelessWindowHint
.
If you want both:
ww.setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.