Skip to content

Commit

Permalink
fixed slider initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
KylieGong committed Sep 9, 2023
1 parent 980d746 commit e9e9cba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qtrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def createWidgetsFromGroups(self):
group_layout.addWidget(label)
options = ''.join(options)
options = options.split(':')
print(default_option)

# print("slider created")
#creates a horizontal decimal slider
Expand All @@ -217,7 +218,7 @@ def createWidgetsFromGroups(self):
slider.setSingleStep(int(float(options[2])*multiplier))
slider.setPageStep(int(float(options[2])*multiplier)) #moves the slider when clicking or up/down
slider.setRange(int(options[0])*multiplier, int(options[1])*multiplier)
slider.setValue(int(float(default_option[0])*multiplier))
slider.setValue(int(float(default_option)*multiplier))

slider_label = QtWidgets.QLabel(f"{slider.value()/multiplier}", self)

Expand Down

0 comments on commit e9e9cba

Please sign in to comment.