qttools_gui: protect against NULL text editor
qttools_gui: add new CodeEditor class