Improve the Qt5 QtQuick template and make it available in CMake as well
ClosedPublic

Authored by apol on Feb 22 2017, 5:37 PM.

Details

Summary
  • Uses resources instead of relying on executing the application in the source

directory.

  • Uses QQmlApplicationEngine instead of QQuickView
  • Doesn't introduce weird logic as if the user had to learn QML by looking at

the template.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Feb 22 2017, 5:37 PM
Restricted Application added a subscriber: kdevelop-devel. ยท View Herald TranscriptFeb 22 2017, 5:37 PM
kfunk requested changes to this revision.Feb 22 2017, 5:42 PM
kfunk added a subscriber: kfunk.

+1 on the idea

app_templates/cpp/CMake/cmake_qt5-qml2/cmake_qt5-qml2.kdevtemplate
4

Kill all the other translated lines? I'm not sure it's needed, but it gives me a warm feeling :P

app_templates/cpp/CMake/cmake_qt5-qml2/qt5-qml2.png
1

The preview image doesn't match what you have in the main.qml, no?

I think you should at least keep some text in the main.qml, e.g. "Hello World".

This revision now requires changes to proceed.Feb 22 2017, 5:42 PM
apol added inline comments.Feb 22 2017, 11:09 PM
app_templates/cpp/CMake/cmake_qt5-qml2/cmake_qt5-qml2.kdevtemplate
4

Scripty will do it ๐Ÿ’ƒ

apol updated this revision to Diff 11647.Feb 22 2017, 11:10 PM
apol edited edge metadata.

Adapted the template

kfunk added inline comments.Feb 23 2017, 12:21 AM
app_templates/cpp/CMake/cmake_qt5-qml2/CMakeLists.txt
7

All the other templates in app_templates/ use APPNAMELC here. Looks like the better choice, considering that you could have a whitespace char in the dir name?

10

Minor: Remove extra newlines

app_templates/cpp/QMake/qt5-qml2/src/qml/main.qml
12

Why no Text{} element at least? Now that's a boring example you have here!

apol updated this revision to Diff 11653.Feb 23 2017, 12:26 AM

Address comments

app_templates/cpp/QMake/qt5-qml2/src/qml/main.qml
12

It's not an example, it's a template!

kfunk accepted this revision.Feb 23 2017, 12:33 AM
kfunk added inline comments.
app_templates/cpp/QMake/qt5-qml2/src/qml/main.qml
12

Phew. Whatever. :)

This revision is now accepted and ready to land.Feb 23 2017, 12:33 AM
This revision was automatically updated to reflect the committed changes.