[Interest] How long is QMatrix obsolete?

Иван Комиссаров abbapoh at gmail.com
Sat Aug 9 09:30:35 CEST 2014

See QImage QImage::transformed(const QTransform & matrix, Qt::TransformationMode mode = Qt::FastTransformation) const

QTransform differs from QMatrix(obsolete) in that it is a true 3x3 matrix, allowing perspective transformations. QTransform's toAffine() method allows casting QTransform to QMatrix(obsolete). If a perspective transformation has been specified on the matrix, then the conversion will cause loss of data.

QTransform is the recommended transformation class in Qt.

Иван Комиссаров

> 09 авг. 2014 г., в 11:11, Guido Seifert <wargand at gmx.de> написал(а):
> Hi,
> just out of curiosity. I updated some of my old code and noticed that QMatrix is marked obsolete. 
> Now, this usually is nothing to write about here. However, I wonder how it is possible to 'obsolete'
> a class, on which other non obsolete Qt classes depend?
> For instance QImage in:
> QImage	transformed(const QMatrix & matrix, Qt::TransformationMode mode = Qt::FastTransformation) const
> Or QBrush:
> void setMatrix(const QMatrix & matrix)
> I know, this does not mean that much... obsolete does not mean that the class will be removed. And it is
> a perfect example for:
> " It is provided to keep old source code working. We strongly advise against using it in new code."
> On the other hand...and strongly IMHO... Qt code should lead by example and not itself depend on obsolete code.
> Guido
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140809/d647b6b0/attachment.html>

More information about the Interest mailing list