From 845707648bc8a1991d96e6ddbdf88bf9790a6b54 Mon Sep 17 00:00:00 2001 From: tianduanrui <2407223896@qq.com> Date: Sat, 31 Aug 2019 09:47:22 +0800 Subject: [PATCH] update testcase --- test/QQtCustomTitleBarMainFormTest/mainform.cpp | 5 +++-- test/QQtOSDFormTest/mainform.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/QQtCustomTitleBarMainFormTest/mainform.cpp b/test/QQtCustomTitleBarMainFormTest/mainform.cpp index 5a30e2d8..1d2ed6b3 100644 --- a/test/QQtCustomTitleBarMainFormTest/mainform.cpp +++ b/test/QQtCustomTitleBarMainFormTest/mainform.cpp @@ -1,4 +1,4 @@ -#include "mainform.h" +#include "mainform.h" #include "ui_mainform.h" #include "qqtbodymover.h" @@ -10,7 +10,8 @@ MainForm::MainForm ( QWidget* parent ) : //如果需要鼠标可以移动窗体。 QQtBodyMover* h = new QQtBodyMover ( this ); - this->installEventFilter ( h ); + //此处不能安装给主窗体,在UNIX系统下,会和QQtTitleBar的鼠标移动共同作用,产生并和移动现象。 + ui->widget_2->installEventFilter ( h ); //这是使用QQtTitleBar的标准过程,请参见mainform.ui。 setWindowIcon ( QIcon ( "logo.ico" ) ); diff --git a/test/QQtOSDFormTest/mainform.cpp b/test/QQtOSDFormTest/mainform.cpp index 121c3268..ba9b7e7d 100644 --- a/test/QQtOSDFormTest/mainform.cpp +++ b/test/QQtOSDFormTest/mainform.cpp @@ -1,4 +1,4 @@ -#include "mainform.h" +#include "mainform.h" #include "ui_mainform.h" #include "qqtbodymover.h" @@ -11,7 +11,8 @@ MainForm::MainForm ( QWidget* parent ) : //如果需要鼠标可以移动窗体。 QQtBodyMover* h = new QQtBodyMover ( this ); - installEventFilter(h); + //此处不能安装给主窗体,在UNIX系统下,会和QQtTitleBar的鼠标移动共同作用,产生并和移动现象。 + ui->widget_2->installEventFilter ( h ); //这是使用QQtTitleBar的标准过程,请参见mainform.ui。 setWindowIcon ( QIcon ( "logo.ico" ) );