We can exploit these features to create an interactive tree viewer with the Qt toolkit in Python. This uses the
draw method when updating. This dict is populated from a widget using a special function included in the code that creates a dialog from a set of widget options. We also add a list view at the bottom that allows individual tips to be selected and colored or set as the root node. The checkboxes shown aren’t functional here as yet but they could be used to make tips invisible.
The code is available here. You can download this python file and run it from the command line. This will work with either pyside2 or pyqt5 which can be installed with pip. To install dependencies use:
pip install toytree pyside2 numpy