Merging EditableTreeModel and TextEdit PyQt6 Examples

Hey everyone, I was trying to make a note-taking app and wanted to start with some examples from the PyQt6 docs (editabletreemodel and textedit) but both are written as QMainWindows, and attempts to rewrite editabletreemodel have been unsuccessful as it loses access to attributes such as update_actions() and remove_row_action(). Would anyone know how I can workaround this to combine these to look sort of like this rough outline?