It is currently Thu Sep 19, 2019 12:19 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: qt trackbargadget
PostPosted: Wed Aug 21, 2019 7:41 pm 
Offline
User
User

Joined: Sat Jan 28, 2012 11:13 am
Posts: 63
Hello
Am I doing it bad ?

setGadgetAttribute
#pb_trackbar_maximum
#pb_trackbar_minimum

seems to be inverted when using Qt subSystem

Code:
EnableExplicit

Define win.l, slider.l

win.l = OpenWindow(#PB_Any, 0, 0, 800 ,240, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
slider.l = TrackBarGadget(#PB_Any, 10, 10, 640, 16, 0, 100)

SetGadgetAttribute(slider.l, #PB_TrackBar_Maximum, 100) ; switch those
SetGadgetAttribute(slider.l, #PB_TrackBar_Minimum, 0)   ; values

Repeat
  Select(WaitWindowEvent(10))
    Case #PB_Event_CloseWindow
      End
  EndSelect
ForEver


made a quick search in the bug section without result


Top
 Profile  
Reply with quote  
 Post subject: Re: qt trackbargadget
PostPosted: Thu Aug 22, 2019 2:09 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1906
Location: Germany
No problem here...

Only on X64 you can't use long ".l". Use always integer ".i"

Code:
EnableExplicit

Define win.i, slider.i

win.i = OpenWindow(#PB_Any, 0, 0, 800 ,240, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
slider.i = TrackBarGadget(#PB_Any, 10, 10, 640, 16, 0, 100)

SetGadgetAttribute(slider.i, #PB_TrackBar_Maximum, 200) ; switch those
SetGadgetAttribute(slider.i, #PB_TrackBar_Minimum, 0)   ; values

Repeat
  Select(WaitWindowEvent(10))
    Case #PB_Event_CloseWindow
      Break
    Case #PB_Event_Gadget
      Select EventGadget()
        Case slider
          Debug GetGadgetState(slider)
      EndSelect
     
  EndSelect
ForEver

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: qt trackbargadget
PostPosted: Thu Aug 22, 2019 6:02 pm 
Offline
User
User

Joined: Sat Jan 28, 2012 11:13 am
Posts: 63
Hello thanks for the answer.
Your code does not work for me if i use Qt subsystem in the compiler options, the trackbar is stuck.
I have to invert maximum and minimum for the trackbar gadget


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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