skidzo
2012-05-05 06:38:12 UTC
Hi I am trying something very simplistic but I am not getting further
with this, so please help.
#Begin of Minimal_Example.py
#############
import guidata
import guidata.dataset.datatypes as dt
import guidata.dataset.dataitems as di
class Processing(dt.DataSet):
"""Example"""
a = di.FloatItem("Parameter #1", default=2.3)
b = di.IntItem("Parameter #2", min=0, max=10, default=5)
autotext = ""
text = di.TextItem("Expl",default=autotext)
type = di.ChoiceItem("Processing algorithm",
("type 1", "type 2", "type 3"))
app = guidata.qapplication()
param = Processing()
param.edit()
param.text = "my text"
param.type = ("my_type 1", "my_type 2", "mai_thai 3")
param.edit()
#############
# End Of File!
Is very good and I can change the text inside the TextItem.
But now I would like to change the ("type 1", "type 2", "type 3") as
tuple or list like e.g.:
param.type = ("my_type 1", "my_type 2", "mai_thai 3")
but somehow I can not select mai_thai 3, meaning: get this to work,
please Help
cheers Johannes
with this, so please help.
#Begin of Minimal_Example.py
#############
import guidata
import guidata.dataset.datatypes as dt
import guidata.dataset.dataitems as di
class Processing(dt.DataSet):
"""Example"""
a = di.FloatItem("Parameter #1", default=2.3)
b = di.IntItem("Parameter #2", min=0, max=10, default=5)
autotext = ""
text = di.TextItem("Expl",default=autotext)
type = di.ChoiceItem("Processing algorithm",
("type 1", "type 2", "type 3"))
app = guidata.qapplication()
param = Processing()
param.edit()
param.text = "my text"
param.type = ("my_type 1", "my_type 2", "mai_thai 3")
param.edit()
#############
# End Of File!
Is very good and I can change the text inside the TextItem.
But now I would like to change the ("type 1", "type 2", "type 3") as
tuple or list like e.g.:
param.type = ("my_type 1", "my_type 2", "mai_thai 3")
but somehow I can not select mai_thai 3, meaning: get this to work,
please Help
cheers Johannes