@Giorgi MSDN said: To use SetWindowPos to bring a window to the top, the process that owns the window must have SetForegroundWindow permission. eg. #include <Windows.h> SetForegroundWindow((HWND)winId()); setWindowFlags(Qt::WindowStaysOnTopHint); // in .pro win32-g++:LIBS += libUser32 win32-msvc*:LIBS += User32.lib