更新代码

This commit is contained in:
feiyangqingyun
2023-01-30 11:41:50 +08:00
parent 890c06d443
commit d35ca11ee2
30 changed files with 85 additions and 68 deletions

View File

@@ -71,7 +71,7 @@ void MaskWidget::setBgColor(const QColor &bgColor)
void MaskWidget::showEvent(QShowEvent *)
{
if (mainWidget != 0) {
if (mainWidget) {
this->setGeometry(mainWidget->geometry());
}
}
@@ -91,7 +91,7 @@ bool MaskWidget::eventFilter(QObject *obj, QEvent *event)
}
} else if (event->type() == QEvent::WindowActivate) {
//当主窗体激活时,同时激活遮罩层
if (mainWidget != 0) {
if (mainWidget) {
if (obj->objectName() == mainWidget->objectName()) {
if (this->isVisible()) {
this->activateWindow();