Custom cursor on Qt?
Posted: Thu Feb 14, 2019 2:33 pm
Hi,
We can set custom cursors for the CanvasGadget and OpenGL gadgets under GTK, but how can we do it under Qt?
We can set custom cursors for the CanvasGadget and OpenGL gadgets under GTK, but how can we do it under Qt?
Code: Select all
If OpenWindow(0, 0, 0, 320, 250, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 10, 10, 300, 50)
If Not Subsystem("qt")
Define img = CreateImage(#PB_Any, 16, 16, 32, #Blue)
Define *cursor.GdkCursor = gdk_cursor_new_from_pixbuf_(gdk_display_get_default_(), ImageID(img), 0, 0)
SetGadgetAttribute(0, #PB_Canvas_CustomCursor, *cursor)
EndIf
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf