forked from M-Labs/artiq
1
0
Fork 0

custom_applet: change constructor, data_changed signatures

This commit is contained in:
Simon Renblad 2023-09-25 15:25:49 +08:00 committed by David Nadlinger
parent 0e8aa33979
commit bafb85a274
1 changed files with 3 additions and 3 deletions

View File

@ -4,13 +4,13 @@ from artiq.applets.simple import SimpleApplet
class DemoWidget(QtWidgets.QLabel):
def __init__(self, args):
def __init__(self, args, ctl):
QtWidgets.QLabel.__init__(self)
self.dataset_name = args.dataset
def data_changed(self, data, mods):
def data_changed(self, value, metadata, persist, mods):
try:
n = str(data[self.dataset_name][1])
n = str(value[self.dataset_name])
except (KeyError, ValueError, TypeError):
n = "---"
n = "<font size=15>" + n + "</font>"