From 170a0b6395d6c6f1d9e10b688e48ca7420f2233a Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 25 Oct 2020 17:24:30 +0200 Subject: [PATCH] Provide cursor geometry in device-independent pixels QImage::size() returns the size of the cursor image in the native pixels. We cannot use it as the cursor size. --- cursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cursor.cpp b/cursor.cpp index 7686d2ce92..f3abca24ee 100644 --- a/cursor.cpp +++ b/cursor.cpp @@ -144,7 +144,7 @@ void Cursor::slotKGlobalSettingsNotifyChange(int type, int arg) QRect Cursor::geometry() const { - return QRect(m_pos - hotspot(), image().size()); + return rect().translated(m_pos - hotspot()); } QRect Cursor::rect() const