[Qt] QPaintEngine::drawTextItem and QTextItem

Den Jean Den.Jean at telenet.be
Wed Sep 26 19:50:43 CEST 2007


On Wednesday 26 September 2007 13:30:23 Den.Jean at telenet.be wrote:
> My generator has assumptions, classes like that are troublemakers
> and part of a list : QtClassesToAvoid. Automatically every method
> that contains a parameter of that type is skipped.


http://archives.devshed.com/forums/kde-96/updated-pyqt4-documentation-1840412.html
others have the same problem.

I really do no think we should use undocumented, perhaps not available 
functions in the next version.
http://lists.trolltech.com/qt-interest/2006-10/thread01252-0.html

Can you provide more detail about what you would do with it.
What the hints were of these devels. To me it seems
the aim is only to be able to insert speed optimization for Qt Core. 
(QRasterPaintEngine). In the end, drawTextItem is called anyhow by TextOut.

My problem, how to insert the strange the constructor-less class QTextItem. 
Just look at the implementation: using a descendant !!! QTextItemInt. C++ 
madness.  

// TextItemInt descends from TextItem
class QTextItemInt : public QTextItem


//but the implementation of QTextItem uses QTextItemInt:
qreal QTextItem::descent() const
{
    const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);
    return ti->descent.toReal();
}


.. still looking into it, but please look up if it is worthwhile.

regards,

Den Jean






More information about the Qt mailing list