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

@ -87,8 +87,8 @@ void IRWidget::handleMouseEvent(QMouseEvent* event)
else
{
// convert from widget space to value space
int new_x = ir_max_x - (event->x() * ir_max_x) / width();
int new_y = (event->y() * ir_max_y) / height();
int new_x = ir_max_x - (event->pos().x() * ir_max_x) / width();
int new_y = (event->pos().y() * ir_max_y) / height();
m_x = std::max(0, std::min(static_cast<int>(ir_max_x), new_x));
m_y = std::max(0, std::min(static_cast<int>(ir_max_y), new_y));