AddiQted to 4.6
11 October 2009note for planetkde readers: check the original article to see the video!
I confess, I’m addiQted. You obviously think it’s normal (you’re not reading this blog by accident, aren’t you?) but it wasn’t always like this: I’ve liked some previous versions, but the upcoming Qt 4.6 really rocks!
The Fotowall case
As I shown previosly, Fotowall already uses some features of Qt 4.6. How much?
Qt 4.6 is referenced in 32 places, for example in snippets like this:
// center the path QPointF pathCenter = path.boundingRect().center(); #if QT_VERSION >= 0x040600 path.translate(-pathCenter); #elif QT_VERSION >= 0x040500 path = QTransform::fromTranslate(-pathCenter.x(), -pathCenter.y()).map(path); #else QTransform tx; tx.translate(-pathCenter.x(), -pathCenter.y()); path = tx.map(path); #endif
From simple path translations to more complex property manipulations, everything got better. See this code snipped about extending QGraphicsObject in 4.6 versus 4.5 and 4.4.
#if QT_VERSION >= 0x040600 class AbstractContent : public QGraphicsObject #else class AbstractContent : public QObject, public QGraphicsItem #endif { Q_OBJECT #if QT_VERSION < 0x040600 Q_PROPERTY(QPointF pos READ pos WRITE setPos) Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged) #endif #if QT_VERSION < 0x040600 && QT_VERSION >= 0x040500 Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity) #endif
Do you feel the pain?
I Need it
I need a world with Qt 4.6 only, because:
- It’s too much of a pain to support older versions in the same codebase
- It’s not even fair, because non-4.6 users won’t enjoy the program as it’s meant to be
- I can’t use A TON of new features because they’ll either simplify too much the code, or just because they don’t have a pre-4.6 equivalent
- and because I’d like to finally use
- QGraphicsEffect for Fotowall’s content
- QVector3D to say goodbye to enricomath.h
- QGesture for multi-finger interaction
- QPropertyAnimation to its full potential!
More 4.6 TEASING
- As you seem to like videos, here is a preview of something we’re working on for Amarok 😉 Qt 4.6 only!!
[youtube width=”420″ height=”220″]http://www.youtube.com/watch?v=RSd9v5xHWa4[/youtube] - Also, since I’m soooo much a giver, see the new Fotowall’s Word Cloud feature, coming in 0.9 😉
See you @ Munich
I’m packing for the DevDays 2009 Munich. See you there 😉