It is currently Wed Oct 16, 2019 11:27 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Custom cursor on Qt?
PostPosted: Thu Feb 14, 2019 2:33 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 463
Hi,

We can set custom cursors for the CanvasGadget and OpenGL gadgets under GTK, but how can we do it under Qt?
Code:
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye