[Qt-creator] A really minor observation about QML & properties

Jason H jhihn at gmx.com
Mon Sep 9 20:31:59 CEST 2019


When I make my own QML components in C, and I have a property and a slot named he same:
Q_PROPERTY(QString name READ name WRITE setName ...)

When I'm typing, QtCreator appends "()" when I tab-complete rather than just completing the name.
x.na[TAB] -> x.name()
vs x.na[TAB] -> x.name (and continue on as: `= "name"`

Usually when this is the case in QML, I want just to use it as a property not a function. I've not observed this with Qt's built-in classes. Does anyone know what I'm doing differently/wrong/could be doing better?

Creator 4.9.2




More information about the Qt-creator mailing list