Skip to content

Commit

Permalink
Pushed missing getMousePosition.h
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Dec 16, 2022
1 parent de77320 commit e4890e4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/editors/getMousePosition.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

#include <QMouseEvent>

inline QPoint getMousePosition(const QMouseEvent *event)
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
return event->pos();
#else
return event->position().toPoint();
#endif
}

0 comments on commit e4890e4

Please sign in to comment.