[Qt] QPaintEngine::drawTextItem and QTextItem

Paul Ishenin ip at kmiac.ru
Thu Sep 27 02:44:49 CEST 2007


Den Jean wrote:

> 
> 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.
> 

Dont warry, I solved speed problem by another workaround - so no more 
need in that drawTextItem.

But things I requested for QAbstractScrollArea are still needed.

Best regards,
Paul Ishenin.




More information about the Qt mailing list