Qt-interest Archive, December 2006
custom QTextObjects
Message 1 in thread
Dear List, or more specifically, Dear Trolls on the list,
I'm in the planning stages of a project that will involve extending the
facilities of QTextDocument with new custom objects. The documentation at
http://doc.trolltech.com/4.2/qtextobject.html
seems only to have this to say:
"When creating custom text objects, you will also need to reimplement
QTextDocument::createObject() which acts as a factory method for creating
text objects."
That seems to indicate that the designers intend that creating custom
objects is reasonable. But when I search for more information about this,
I'm only coming up with puzzled people in the archives, or people who are
complaining about having to make due with difficult APIs, such as this
thread.
http://lists.trolltech.com/qt4-preview-feedback/2004-12/thread00095-0.html
There are some useful comments in that thread, but before I embark on a
project that seems to be guaranteed to require hacking, I would like to know
if there's an official position here. Trolls monitoring this list, did you
mean us to subclass QTextObject and/or its friends? If so, when do you plan
to teach us how, or give us an example? Is the API likely to change any
time soon? (The only thing I find in TaskTracker about this is a
cut-and-paste feature request, #102864, and the related #132469.)
Of course, anyone with helpful tips is welcome to reply, not just trolls!
Thank you for any light you can shed on the future. :)
Nathan
--
[ signature omitted ]