[Qt-interest] Model/View with QTextDocument
Oliver Heins
heins at sopos.org
Wed May 12 15:24:43 CEST 2010
No one? No idea? Any hint would be appreciated.
Thanks,
olli
Oliver Heins <heins at sopos.org> writes:
> Hi,
>
> I wonder whether it's possible to use Qt's Model/View mechanisms in
> conjunction with a QTextDocument.
>
> My data should be view- and editable in several QTextEdits (or
> subclasses of it), where parts of the data could be displayed in one or
> more QTextEdits.
>
> Basically, QTextFragments could be linked with the Model:
>
> <fragment>Hey, this is some text in the document.</fragment><fragment>
> And this is some other.</fragment>
>
> where each <fragment></fragment> links to a part of data in the model.
>
> The main problem I see is that new fragments get created (which should
> be okay) and destroyed (that would be fatal, because the linkage to the
> model would be destroyed) on the fly by QTextDocument. So the above
> example has to remain stable and must not be converted to this:
>
> <fragment>Hey, this is some text in the document. And this is some
> other.</fragment>
>
> Any chance to achieve this?
>
> TIA,
> olli
--
Oliver Heins heins at sopos.org http://www.sopos.org/olli
GPG: F27A BA8C 1CFB B905 65A8 2544 0F07 B675 9A00 D827
1024D/9A00D827 2004-09-24 -- gpg --recv-keys 0x9A00D827
Please avoid sending me Word or PowerPoint attachments:
http://www.gnu.org/philosophy/no-word-attachments.html
More information about the Qt-interest-old
mailing list