I currently have an application which consists of a large-ish dialog containing (amongst other things) a QWebView widget showing the contents of a single html file (or unicode string). This is working fine.
I would be interested in adding an extra widget showing the Code view equivalent and am wondering whether I can use one of the Editor's widgets for this. TextEdit in calibre/gui2/tweak_book/editor/text.py looks hopeful. Is it possible to use this class to edit a selected single html file? If so, could you show me a bit of sample code showing how I might add an 'edit html file including a theme' widget into an existing dialog?
My current sort-of-editing method is to use a subprocess.call to my standard PC text editor, which does have some benefits, but is not ideal. I'm only exploring ideas for now so any pointers would be appreciated