[vlc-commits] qt: add setCursor and restoreCursor functions to main_interface

Fatih Uzunoglu git at videolan.org
Mon Dec 7 10:08:35 UTC 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Dec  4 02:01:52 2020 +0300| [f547ce943f7c775b8d47b6fd3de9b43ff53f3955] | committer: Pierre Lamot

qt: add setCursor and restoreCursor functions to main_interface

These functions allow controlling the mouse cursor globally.

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f547ce943f7c775b8d47b6fd3de9b43ff53f3955
---

 modules/gui/qt/maininterface/main_interface.hpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/gui/qt/maininterface/main_interface.hpp b/modules/gui/qt/maininterface/main_interface.hpp
index 4ec9c3a04e..5a0d4e893d 100644
--- a/modules/gui/qt/maininterface/main_interface.hpp
+++ b/modules/gui/qt/maininterface/main_interface.hpp
@@ -202,6 +202,9 @@ public:
     VideoSurfaceProvider* getVideoSurfaceProvider() const;
     void setVideoSurfaceProvider(VideoSurfaceProvider* videoSurfaceProvider);;
 
+    Q_INVOKABLE static inline void setCursor(Qt::CursorShape cursor) { QApplication::setOverrideCursor(QCursor(cursor)); };
+    Q_INVOKABLE static inline void restoreCursor(void) { QApplication::restoreOverrideCursor(); };
+
 protected:
     void dropEventPlay( QDropEvent* event, bool b_play );
     void dropEvent( QDropEvent *) Q_DECL_OVERRIDE;



More information about the vlc-commits mailing list