[Qt-creator] QML Code Completion problems

ekke ekke at ekkes-corner.org
Sun Oct 21 15:50:08 CEST 2018


There are some really annoying problems with QtC 4.7.1 / 4.8B1

Platforms: macOS, iOS, Android on macOS 10.13.6
Qt 5.11.2 / 5.12.B2

If only one project is open, switching between Android, iOS, Desktop
always resolves the QML Imports.

If there are many projects open, then in most cases only Desktop
resolves the Imports.
This means to get code completion while testing Android or iOS you must
switch to Desktop, edit the code, switch back to Android or iOS and go on.

Even with only one project open where all Imports are resolved,
I got an Error 'Unknown Component (M300)' for layer.effect: DropShadow
Switching to Android or Desktop the Error went away.
Import Qt.GraphicalEffects 1.0 allways was resolved ok

next part where my code completion isn’t working as expected :
if some projects are open with same C++ Class names
doesn’t matter if set as context property or QmlRegisterType.
Creator doesn’t differentiate between the projects – the first one wins.
Have to restart QtCreator to get the correct code completion for current
active Project.

https://bugreports.qt.io/browse/QTCREATORBUG-20195
https://bugreports.qt.io/browse/QTCREATORBUG-20211

there are so many cool features I really like in Qt Creator. The
clang-tidy Analyzer helps me a lot to make my code better and QML now
finds all misused anchors in Layouts. (As I started Qt/QML development 3
years ago I wasn't aware that anchors shouldn't be used in Layouts)

but the simple thing to get code-completion in QML if more than one
project is open fails :(


ekke




More information about the Qt-creator mailing list