frmdstryr / enamlx

Additional Qt Widgets for Enaml
MIT License
28 stars 9 forks source link

[DOC] How to switch table data from selecting a tree ? #31

Open Kochise opened 2 years ago

Kochise commented 2 years ago

Hi, I try to change the data into a TableView, I tried using a ComboBox and it kinda works :

table_view_combo

table_view_combo.enaml.txt

BTW, the age column is not refreshed with SpinBox, we get "Loading..." instead.

Then I wanted to do the same using a TreeView yet like I mentioned in #28, I cannot trigger the change like with the ComboBox using attr model << data_models[cbox.selected_item] :

table_view_tree

table_view_tree.enaml.txt

Any hint how to do that ?

PLUS, I'd like to switch on a new data set created at runtime. Not pre-computed before creating the UI.

Regards.