我有一个类GroupScreen
,其变量self.abc = 10
然后如何在TreeviewGroup
类中获取此变量值并传入此查询cur.execute("SELECT * FROM
test {{1} } ID为WHERE
=?", (abc,))
答案 0 :(得分:2)
将abc
添加到__init__
应该有效:
class TreeviewGroup(Popup):
treeview = ObjectProperty(None)
tv = ObjectProperty(None)
def __init__(self, abc, **kwargs): # note the `abc`
...