Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
'WindowStaysOnTopHint' 不适用于小部件'ww',为什么?
Dialog w; widget ww; ww.setWindowFlags(Qt::WindowStaysOnTopHint); ww.setWindowFlags(Qt::FramelessWindowHint); ww.setFixedSize(206,206); w.show(); ww.show();
因为您将其替换为Qt::FramelessWindowHint.
Qt::FramelessWindowHint
如果你想要两者:
ww.setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint);