If you use QT_NO_CAST_FROM_ASCII in your project, you will have to surround your names with QStringLiteral() in calls to QQmlContext::setContextProperty(). Then, however, the QML Editor will not recognize your names and overlay your code with a warning. How can I get around that?