Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.12.0
-
None
Description
There are huge difficulties when I try to program modular (plugin based) text editor with Qt library. Problem is with QTextBlock which allow only one attached QTextBlockUserData derived object.
This is wrong in my case:
I want to use SyntaxHiglighter class from KSyntaxHighlighting from Kde. It already using QTextBlockUserData internally.
I want to create plugins with text editor and separate plugin for syntax highlighting. I don't want to mess editor code with syntaxhiglighter code.
I want in my editor bookmarks - in order to use it I have to use QTextBlockUserData.
In C++ I can't use efectively class which derive from 2 classes my LineInfo and KSyntaxHighlighting::TextBlockUserData - I cant cast between these two classes. This aproach will be enough because in my syntax highligter plugin I can create such class without mess the text editor plugin.
When I will have something like QTextBlock::addUserData(QTextBlockUserData *data); and QList<QTextBlockUserData *> QTextBlock::userData();
Then I will be able to check what user data is mine by simple: dynamic_cast<LineInfo*>().