我无法使用 nested 让视图按预期工作HasTraits
。例如:
class A(HasTraits):
b= Any()
...
view = View(...
Item('b', style='custom')
...
我想导入 b 的类并将其分配给 A,
from some_other_mod import B
# B HasTraits also
a = A(b = B())
这有效,但是B()
当a
我a.configure_traits()
(注意这是相关的,但与这篇文章不同)