#include "QDesktopWidget"

QDesktopWidget* desktopWidget = QApplication::desktop();
QRect deskRect = desktopWidget->availableGeometry();  //可用区域
QRect screenRect = desktopWidget->screenGeometry();  //屏幕区域
int w = screenRect.width();
int h = screenRect.height();


if ((w > 0)&&(h > 0))
{
    this->resize(QSize(w,h));
}

 

相关文章:

  • 2021-11-18
  • 2021-08-17
  • 2022-12-23
  • 2021-11-01
  • 2021-09-15
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-25
  • 2021-11-17
相关资源
相似解决方案