Friday, April 16, 2010

Preliminary work

I have already developed a prototype using Qt that provides individual QTextEdit widgets for each block of user input. This makes it possible to have an editable cell be independent from the area where output or errors are displayed (which can't be achieved if a single widget like QTableWidget is used for the entire UI). The screenshot above shows this basic interface, where formatting and write control are handled independently for each area.
I also explored other tools such as QScintilla and OpenModelica (wrapping its interface with Cython) but due to license incompatibilities (GPL) decided against using these and will rely solely on Qt.


  1. I think you will find QPlainTextEdit more suitable that QTextEdit. Its layout engine is much faster and it supports colors, bold, etc. (It doesn't support tables, lists & frames, but presumably you don't need them.) Also, you can use QSyntaxHighlighter with QPlainTextEdit just the same as QTextEdit.

    PS I couldn't see the screenshot & find this website almost unreadable; wish you'd switch to black on white.

  2. Now that you mention it... It is a good idea that I've been fighting with because there's a discussion on IPython's mailing list about how the sessions should be saved and the export and import formats.
    One of the ideas was to capture the info for the help widget from the web so a QTextEdit will be the correct choice, but I think we're going to abandon the idea and go for ReStructured Text as the main format for saving and load information (for now, this discussion has a lot of details).
    Also there's no problem with a design based in QPlainTextEdit because if for some reason we find that we need to use QTextEdit the changes would be minor.