QT 自定义属性 切换样式
if(windowState()==Qt::WindowMaximized)
{
this->showNormal();
ui->maxButton->setProperty("selected",true);
}
else
{
this->showMaximized();
ui->maxButton->setProperty("selected",false);
}
style()->unpolish(ui->maxButton);
style()->polish(ui->maxButton);
//ui->maxButton-> update();