mirror of
https://github.com/nqrduck/nqrduck-spectrometer.git
synced 2025-01-03 06:08:06 +00:00
Fixed issue with updating of settings
This commit is contained in:
parent
5c57bf2a96
commit
ebf5ac8116
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
import logging
|
||||
from functools import partial
|
||||
from PyQt6.QtWidgets import QWidget, QLabel, QLineEdit, QHBoxLayout, QSizePolicy, QSpacerItem
|
||||
from nqrduck.module.module_view import ModuleView
|
||||
|
||||
|
@ -45,7 +46,8 @@ class BaseSpectrometerView(ModuleView):
|
|||
# Add a horizontal layout for the setting
|
||||
layout = QHBoxLayout()
|
||||
# Connect the editingFinished signal to the on_value_changed slot of the setting
|
||||
line_edit.editingFinished.connect(lambda: setting.on_value_changed(line_edit.text()))
|
||||
update_func = partial(setting.on_value_changed, line_edit.text())
|
||||
line_edit.editingFinished.connect(lambda x=line_edit: setting.on_value_changed(x.text()))
|
||||
# Add the label and the line edit to the layout
|
||||
layout.addItem(spacer)
|
||||
layout.addWidget(setting_label)
|
||||
|
|
Loading…
Reference in a new issue