From 66a9a674fca34632e174d859887d3c93dcd5c231 2014-03-12 10:29:07 From: Titta Heikkala Date: 2014-03-12 10:29:07 Subject: [PATCH] Document the need for QApplication Since Qt Creator 3.0 the wizard creates a project for Qt Quick 2 that uses QGuiApplication. Qt Charts requires QApplication. This is documented to the QML API page. Task-number: QTRD-2746 Change-Id: Ibddfe9d0da6644f2142bc967c85979d3c6df01a2 Reviewed-by: Miikka Heikkinen --- diff --git a/doc/src_qt4/qml.qdoc b/doc/src_qt4/qml.qdoc index 68ab1d7..5199e3e 100644 --- a/doc/src_qt4/qml.qdoc +++ b/doc/src_qt4/qml.qdoc @@ -23,6 +23,11 @@ As of release 1.3.0, Qt Charts is also usable with Qt Quick 2, though the performance is slightly worse than with Qt Quick 1 due to the additional rendering step that is required. + \note Since Qt Creator 3.0 the project created with Qt Quick Application wizard based on + Qt Quick 2 template uses QGuiApplication by default. As Qt Charts utilizes Qt Graphics View + Framework for drawing, QApplication must be used. The project created with the wizard is + usable with Qt Charts after the QGuiApplication is replaced with QApplication. + \note Qt Quick 1 is supported from Qt 4.7.4 onwards because of the missing Q_REVISION macro in the earlier Qt releases. Qt Quick 2 is supported with only Qt 5. diff --git a/doc/src_qt5/qml.qdoc b/doc/src_qt5/qml.qdoc index 850e963..056e732 100644 --- a/doc/src_qt5/qml.qdoc +++ b/doc/src_qt5/qml.qdoc @@ -23,6 +23,11 @@ As of release 1.3.0, Qt Charts is also usable with Qt Quick 2, though the performance is slightly worse than with Qt Quick 1 due to the additional rendering step that is required. + \note Since Qt Creator 3.0 the project created with Qt Quick Application wizard based on + Qt Quick 2 template uses QGuiApplication by default. As Qt Charts utilizes Qt Graphics View + Framework for drawing, QApplication must be used. The project created with the wizard is + usable with Qt Charts after the QGuiApplication is replaced with QApplication. + \note Qt Quick 1 is supported from Qt 4.7.4 onwards because of the missing Q_REVISION macro in the earlier Qt releases. Qt Quick 2 is supported with only Qt 5.