It is currently Mon Dec 09, 2019 1:06 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [Done] Qt - ScintillaGadget and #PB_EventType_RightClick
PostPosted: Tue Mar 19, 2019 5:30 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 508
On the Qt subsystem, the ScintillaGadget doesn't fire the #PB_EventType_RightClick event.

The functionality can be enabled with the QtScript command, however.
Code:
Runtime Procedure QtSignalHandler()
    MessageRequester("", "Qt Event")
EndProcedure 
 
Procedure OnScintillaRightClick()
  MessageRequester("", "PureBasic Event")
EndProcedure
 
If OpenWindow(0, 0, 0, 320, 250, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ScintillaGadget(0, 10,  10, 300, 50, 0)
   
  QtScript("gadget(0).contextMenuPolicy = 3") ; Qt::CustomContextMenu
  QtScript(~"gadget(0).customContextMenuRequested.connect(function() { runtime.call(\"QtSignalHandler()\"); })")   
   
  BindGadgetEvent(0, @OnScintillaRightClick(), #PB_EventType_RightClick)

  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf


Top
 Profile  
Reply with quote  
 Post subject: Re: Qt - ScintillaGadget and #PB_EventType_RightClick
PostPosted: Wed Apr 10, 2019 7:58 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13646
Location: France
Fixed.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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