fix build with qt5

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2022-03-19 15:35:23 +08:00
parent b1f0e38fc8
commit 8ccd39ac9b
1 changed files with 3 additions and 3 deletions

View File

@ -210,7 +210,7 @@ void FramelessWidgetsHelper::mousePressEventHandler(QMouseEvent *event)
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
const QPoint scenePos = event->scenePosition().toPoint(); const QPoint scenePos = event->scenePosition().toPoint();
#else #else
const QPoint scenePos = event->windowPos(); const QPoint scenePos = event->windowPos().toPoint();
#endif #endif
if (shouldIgnoreMouseEvents(scenePos)) { if (shouldIgnoreMouseEvents(scenePos)) {
return; return;
@ -233,7 +233,7 @@ void FramelessWidgetsHelper::mouseReleaseEventHandler(QMouseEvent *event)
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
const QPoint scenePos = event->scenePosition().toPoint(); const QPoint scenePos = event->scenePosition().toPoint();
#else #else
const QPoint scenePos = event->windowPos(); const QPoint scenePos = event->windowPos().toPoint();
#endif #endif
if (shouldIgnoreMouseEvents(scenePos)) { if (shouldIgnoreMouseEvents(scenePos)) {
return; return;
@ -264,7 +264,7 @@ void FramelessWidgetsHelper::mouseDoubleClickEventHandler(QMouseEvent *event)
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
const QPoint scenePos = event->scenePosition().toPoint(); const QPoint scenePos = event->scenePosition().toPoint();
#else #else
const QPoint scenePos = event->windowPos(); const QPoint scenePos = event->windowPos().toPoint();
#endif #endif
if (shouldIgnoreMouseEvents(scenePos)) { if (shouldIgnoreMouseEvents(scenePos)) {
return; return;