summaryrefslogtreecommitdiff
path: root/examples/triage/byte.cpp
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2021-02-19 19:25:53 -0500
committerRusty Wagner <rusty.wagner@gmail.com>2021-03-16 20:40:13 -0400
commite43222c3e8da9f42d0d95207fa94335165a27d9d (patch)
treee8f64b54dafd7c75f48c95bd7c7e62fed0c904a2 /examples/triage/byte.cpp
parenta327eb06173d0aa814460842e5280a6bf1edddf1 (diff)
Compatibility with Qt 6
Diffstat (limited to 'examples/triage/byte.cpp')
-rw-r--r--examples/triage/byte.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/triage/byte.cpp b/examples/triage/byte.cpp
index 58835ed7..c3a91372 100644
--- a/examples/triage/byte.cpp
+++ b/examples/triage/byte.cpp
@@ -1064,8 +1064,8 @@ void ByteView::mousePressEvent(QMouseEvent* event)
{
if (event->button() != Qt::LeftButton)
return;
- int x = (event->x() - 2) / m_render.getFontWidth() - ((int)m_addrWidth + 2);
- int y = (event->y() - 2) / m_render.getFontHeight();
+ int x = (event->pos().x() - 2) / m_render.getFontWidth() - ((int)m_addrWidth + 2);
+ int y = (event->pos().y() - 2) / m_render.getFontHeight();
m_lastMouseX = x;
m_lastMouseY = y;
m_cursorAddr = addressFromLocation(x, y);
@@ -1081,8 +1081,8 @@ void ByteView::mouseMoveEvent(QMouseEvent* event)
{
if (event->buttons() != Qt::LeftButton)
return;
- int x = (event->x() - 2) / m_render.getFontWidth() - ((int)m_addrWidth + 2);
- int y = (event->y() - 2) / m_render.getFontHeight();
+ int x = (event->pos().x() - 2) / m_render.getFontWidth() - ((int)m_addrWidth + 2);
+ int y = (event->pos().y() - 2) / m_render.getFontHeight();
if ((x == m_lastMouseX) && (y == m_lastMouseY))
return;
m_lastMouseX = x;