How to Make Your Window Stay on Top in Qt

Posted on Posted in Qt Tutorials, Tutorials

You can use the following snippet to make your MainWindow or any other window always on top:

setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);

Just insert it in your window’s constructor function.

Leave a Reply

Your email address will not be published. Required fields are marked *