使用QApplication::desktop()->availableGeometry获取屏幕信息
//this到对应的显示器上全屏显示
QRect screenGeometry = QApplication::desktop()->availableGeometry(this);//不遮挡工具栏
// 将窗口设置为最大化,并调整大小和位置以适合当前屏幕
this->showMaximized();
this->setGeometry(screenGeometry);
this->show();