Top window operation

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )

Use setWindowFlags interface settings window WindowStaysOnTopHintproperty implementation top operation.

interface

Qt::WindowFlags windowFlags() const
void setWindowFlags(Qt::WindowFlags type)

Window top

  • The notification window system window should be on top of all other windows. Note that in some window manager on X11, you must also pass Qt::X11BypassWindowManagerHint, so this flag to work properly.
setWindowFlags(windowFlags()| Qt::WindowStaysOnTopHint);

Window set to end

  • Notification window system should be located at the bottom of the window of all other windows.
setWindowFlags(windowFlags()| Qt::WindowStaysOnBottomHin);

Guess you like

Origin blog.csdn.net/nicai_xiaoqinxi/article/details/92849959