set_cursor

0th

Percentile

Set the cursor of a view

Change the shape of cursor on a view.

Usage
set_cursor(view, cursor = "ArrowCursor")
Arguments
view
the view for which to change the cursor (created by qplotView)
cursor
an integer or a character string (see Details)
Details

All possible cursor types with the corresponding integer code are:

0: ArrowCursor; 1: UpArrowCursor; 2: CrossCursor; 3: WaitCursor; 4: IBeamCursor; 5: SizeVerCursor; 6: SizeHorCursor; 7: SizeBDiagCursor; 8: SizeFDiagCursor; 9: SizeAllCursor; 10: BlankCursor; 11: SplitVCursor; 12: SplitHCursor; 13: PointingHandCursor; 14: ForbiddenCursor; 17: OpenHandCursor; 18: ClosedHandCursor; 15: WhatsThisCursor; 16: BusyCursor; 20: DragMoveCursor; 19: DragCopyCursor; 21: DragLinkCursor; 24: BitmapCursor

We can pass either the integer code or the character string to the cursor argument.

Value

NULL; the cursor of the view is set as a side effect

References

http://doc.qt.nokia.com/latest/qt.html#CursorShape-enum

Aliases
  • set_cursor
Examples
library(cranvas)
library(qtpaint)
scene <- qscene()
qlayer(scene)
v <- qplotView(scene = scene)
print(v)

set_cursor(v, "WaitCursor")

set_cursor(v, 2L)  # CrossCursor
Documentation reproduced from package cranvas, version 0.8.5, License: GPL

Community examples

Looks like there are no examples yet.