{if(this->isMinimized()) { qDebug()<<"最小化"; }elseif(this->isMaximized()) { qDebug()<<"最大化"; }elseif(this->windowState()==Qt::WindowNoState) { qDebug()<<"正常"; } } } }
1 QT += core gui 2 3 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 5 CONFIG += c++11 6 7 # The following define makes your compiler emit warnings if you use 8 # any Qt feature that has been marked deprecated (the exact warnings 9 # depend on your compiler). Please consult...
相关资料: https://blog.csdn.net/weixin_43165135/article/details/125527497 实例代码: .pro 1 QT += core gui 2 3 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets