随主窗口移动

This commit is contained in:
w-mj committed 2017-12-24 10:27:46 +08:00
1 parent 8465875c2a
commit 77f1186af8
2 files changed
+10

No files matched your search

+9
View File
@@ -18,6 +18,7 @@ MainWindow::MainWindow(QWidget *parent) :
Monitor *monitor = new Monitor(this);
resize(monitor->size());
installEventFilter(this);
}
MainWindow::~MainWindow()
@@ -52,3 +53,11 @@ void MainWindow::showListWindow(bool enable)
} else
list->hide();
}
bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
if (event->type() == QEvent::Move) {
logWindow->setGeometry(x()+width() + 15, y() + 35, 400, 450);
list->setGeometry(x()+width() + 15, y() + width() / 2, 400, 450);
}
return QWidget::eventFilter(obj, event);
}