// showMaximized(); // Qt最大化显示函数 任务栏都会覆盖
static bool max = false;
static QRect location = this->geometry();
if (max) {
this->setGeometry(location);//回复窗口原大小和位置
// ui->maxBtn->setIcon(QIcon(":/MAX_.png"));
}else {
// ui->maxBtn->setIcon(QIcon(":/minMAX.png"));
location = this->geometry(); //最大化前记录窗口大小和位置
//this->setGeometry(qApp->desktop()->availableGeometry());
// this->showFullScreen(); //设置窗口铺满全屏 任务栏都会覆盖
this->setGeometry(QApplication::desktop()->availableGeometry()); // 不会覆盖任务栏
}
max = !max;