Add support for building against Qt 6

This commit is contained in:
spycrab
2021-04-25 02:18:28 +02:00
committed by Shawn Hoffman
parent f8c603a2dd
commit 004e8a80b2
24 changed files with 545 additions and 84 deletions

View File

@ -510,7 +510,13 @@ void GBAWidget::mouseMoveEvent(QMouseEvent* event)
{
if (!m_moving)
return;
move(event->globalPos() - m_move_pos - (geometry().topLeft() - pos()));
auto event_pos =
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
event->globalPosition().toPoint();
#else
event->globalPos();
#endif
move(event_pos - m_move_pos - (geometry().topLeft() - pos()));
}
void GBAWidget::paintEvent(QPaintEvent* event)