On 28.05.2014 21:25, Thorbjørn Lindeijer wrote: > So what you need to do is for your text document is to make sure it has > this custom layout subclass set on it as well. This code is found in the > BaseTextDocument constructor: > >> BaseTextDocumentLayout *documentLayout = new >> BaseTextDocumentLayout(d->m_document); >> d->m_document->setDocumentLayout(documentLayout);
Sorry, I think my instructions are rather misleading. The BaseTextEditorWidget is only meant to be used with a BaseTextDocument. You should probably not use its setTextDocument function at all, which only happens to be available because it's a subclass of the QPlainTextEdit widget. If you need to integrate a class that derives from QTextDocument, you should probably look into changing your own class to derive from the BaseTextDocument instead. Regards, Bjørn _______________________________________________ Qt-creator mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/qt-creator
