[Development] QtQuick becomes a separate module

Kent Hansen kent.hansen at nokia.com
Fri Dec 2 09:33:00 CET 2011


Hi,
See https://bugreports.qt.nokia.com/browse/QTBUG-22889

Once http://codereview.qt-project.org/#change,9948 goes through CI, 
QtQuick will be a separate module (AKA library). This is where all the 
QtQuick (2.0) types will live, and QtQuick-specific C++ APIs, like 
QQuickItem and scenegraph.

The old headers (e.g. QtDeclarative/qquickitem.h) will continue to work 
for some time. But eventually, all existing code must be ported to the 
QtQuick module.

What do _you_ have to do? If you're using QtQuick C++ APIs:

1. Update your .pro files.

   QT += declarative

should become

   QT += declarative quick

2. Update your includes.

   #include <QtDeclarative/qquickitem.h>

should become

   #include <QtQuick/qquickitem.h>

and similarly for other QtQuick/SceneGraph classes.

Additionally, qmake will take care of automagically adding "QT += quick" 
to projects that only do "QT += declarative" (and you'll get a warning) 
(http://codereview.qt-project.org/#change,9803). If you don't use the 
QtQuick APIs at all, you'll just have to ignore that warning until we 
remove the compatibility support.

I've tried to ensure that existing code builds and runs without 
requiring immediate changes, but I wouldn't be shocked if I missed 
something. If you do encounter problems, please file a bug in JIRA.

I'll send an update once the change has gone in.

Best regards,
Kent



More information about the Development mailing list