From f88af4b6c036dce363412d86ebeb3587e31acfef Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Fri, 11 Oct 2019 18:01:11 +0800 Subject: [PATCH] fix: don't allowed move window by drag when maximized --- mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index dad420a..cf84e33 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -172,7 +172,7 @@ void MainWindow::leaveEvent(QEvent *event) void MainWindow::mousePressEvent(QMouseEvent *event) { - if (event->buttons() & Qt::LeftButton) { + if (event->buttons() & Qt::LeftButton && !isMaximized()) { m_clickedOnWindow = true; m_oldMousePos = event->pos(); qDebug() << m_oldMousePos << m_graphicsView->transform().m11()