From e7f8663ce25613a580b5b29360fe1f8ff3579276 Mon Sep 17 00:00:00 2001 From: rankun Date: Mon, 4 Feb 2019 13:57:34 +0800 Subject: [PATCH] =?UTF-8?q?update:=E5=85=A8=E5=B1=8F=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=B7=A5=E5=85=B7=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QtScrcpy/toolform.cpp | 13 +++++++++++++ QtScrcpy/toolform.h | 3 +++ QtScrcpy/videoform.cpp | 4 +++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/QtScrcpy/toolform.cpp b/QtScrcpy/toolform.cpp index ec6de4c..835e49f 100644 --- a/QtScrcpy/toolform.cpp +++ b/QtScrcpy/toolform.cpp @@ -1,4 +1,7 @@ #include +#include +#include +#include #include "toolform.h" #include "ui_toolform.h" @@ -58,6 +61,16 @@ void ToolForm::mouseMoveEvent(QMouseEvent *event) } } +void ToolForm::showEvent(QShowEvent *event) +{ + qDebug() << "show event"; +} + +void ToolForm::hideEvent(QHideEvent *event) +{ + qDebug() << "hide event"; +} + void ToolForm::on_fullScreenBtn_clicked() { if (m_videoForm) { diff --git a/QtScrcpy/toolform.h b/QtScrcpy/toolform.h index 2c09f37..5e2ace6 100644 --- a/QtScrcpy/toolform.h +++ b/QtScrcpy/toolform.h @@ -24,6 +24,9 @@ protected: void mouseReleaseEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); + void showEvent(QShowEvent *event); + void hideEvent(QHideEvent *event); + private slots: void on_fullScreenBtn_clicked(); diff --git a/QtScrcpy/videoform.cpp b/QtScrcpy/videoform.cpp index b98fe5e..3d02f49 100644 --- a/QtScrcpy/videoform.cpp +++ b/QtScrcpy/videoform.cpp @@ -432,7 +432,9 @@ void VideoForm::paintEvent(QPaintEvent *paint) void VideoForm::showEvent(QShowEvent *event) { Q_UNUSED(event); - showToolFrom(); + if (!isFullScreen()) { + showToolFrom(); + } } void VideoForm::dragEnterEvent(QDragEnterEvent *event)