https://www.bbsmax.com/A/GBJr0779d0/ Qt 窗口操作函数(置顶、全屏,最大化最小化按钮设置等
setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint);
PS:
showFullScreen() // Qt全屏显示函数
showMaximized() // Qt最大化显示函数
showMinimized() // Qt最小化显示函数
resize(x, y) // Qt固定尺寸显示函数
setMaximumSize(w, h) // Qt设置最大尺寸函数
setMinimumSize(w, h) // Qt设置最小尺寸函数
// 全屏显示:
VideoWidget->setWindowFlags(Qt::Window);
VideoWidget->showFullScreen();
// 退出全屏时:
VideoWidget->setWindowFlags(Qt::SubWindow);
VideoWidget->showNormal();