When executing:
import PySimpleGUI as sg
layout = [[sg.Slider(change_submits=True, range=(-1, 1),
resolution=0.01, orientation='h', default_value=-0.1)]]
window = sg.Window('Window that stays open').Layout(layout)
while True:
event, values = window.Read()
if event is None or event == 'Exit':
break
print(values[0])
window.Close()
I expect to see floats on the console. Instead I only see either -1, 0 or 1.
Sorry about that.... Needed to get the value differently.
I've checked in a change into the Master Branch. To get the fitx download a new PySimpleGUI.py file and place into your application folder.
Note that for PySimpleGUIQt... it only returns floats. The user is required to do the necessary math to convert int to float in their code. If you have plans to possibly move to Qt, then I would suggest setting the slider to go from 0 to 100 and then divide by 100 after you get the value.
Released to PyPI so closing.
Most helpful comment
Sorry about that.... Needed to get the value differently.
I've checked in a change into the Master Branch. To get the fitx download a new PySimpleGUI.py file and place into your application folder.