TabWidget: fix bug where QCodeEdit loose its type

nd become QPlainTextEdit. The issue is most probably an issue in PyQt4
but we can workaround it by keep our own list of widgets.

The bug does not seem to appear anymore (but it needs more testing before making
a new bug fix release).