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
Branch
5.1
Lint
No Linters Available
Unit
No Unit Test Coverage
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
6 β†—(On Diff #11647)

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?

9 β†—(On Diff #11647)

Minor: Remove extra newlines

app_templates/cpp/QMake/qt5-qml2/src/qml/main.qml
12 β†—(On Diff #11647)

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 β†—(On Diff #11647)

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 β†—(On Diff #11647)

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.