Important: Please read the Qt Code of Conduct -

QWidget::raise() and setWindowFlags(Qt::WindowStaysOnTopHint) not working

  • Hi all,

    I have a QMainwindow and in the QMainwindow I put a QGLWidget in a gridLayout.

    At the right-bottom corner of QMainwindow, I also put another QWidget with a progress bar in it. Now I want the corner widget to be on top of everything when it's show() ing, but neither QWidget::raise() nor setWindowFlags(Qt::WindowStaysOnTopHint) is working.

    Some other information that might be useful :

    1. The parent of QGLWidget is the centerWidget of QMainwindow and the parent of corner QWidget is QMainwindow.
    2. I set a QGraphicsOpacityEffect on the corner QWidget.

    Does anyone have any idea of why it is like this and how do I solve it?

    Thanks very much.

Log in to reply