Can I update Qt Creator or configure it to recognize Promises and arrow functions?

1918
2
06-17-2019 09:30 AM
KeithLarson1
MVP Alum

Hello all,

I am looking to use Promises and arrow functions in my code, but the version of Qt Creator I have installed (4.5.0) does not recognize the Promise keyword or the arrow function syntax. The code runs, but it doesn't look nice in this version of Qt Creator. I have had ApStudio installed for over a year, so I'm not sure if installing AppStudio updates failed to update Qt Creator with it, or if 4.5.0 is just what is included with AppStudio. Does anyone know if I can get the text editor to recognize these features, or if I can update Qt Creator without breaking the AppStudio integration?

Thanks,

Keith

0 Kudos
2 Replies
StephenQuan1
Esri Contributor

Hi Keith,

This got fixed improved in Qt Creator 4.9.0, see https://bugreports.qt.io/browse/QTCREATORBUG-20341

A version of the Qt Creator 4.9.0 is shipped with Qt 5.12.4 (which just got release recently). Read about it here Qt 5.12.4 Released with support for OpenSSL 1.1.1 - Qt BlogQt 5.12.4 is now available via the maintenance tool of the online installer. For new installations, please download latest online installer from Qt Account portal or from qt.io Download page.

Note that this version of Qt is not fully compatible with Local Make as per https://doc.arcgis.com/en/appstudio/extend-apps/installdevtoolslocalmake.htm. These set of instructions are provided just so that you can get a version of Qt Creator 4.9.0 that supports the ECMAScript 262 features for your arrow functions.

After installing it, you need to configure AppStudio to use Qt Creator 4.9.0 instead of the Qt Creator 4.5.0 shipped with AppStudio.

On Windows:

  1. In a Command Promt run: %USERPROFILE%\Applications\ArcGIS\AppStudio\sdk\ideintegration\post-install.bat
  2. Edit %APPDATA%\Esri\AppStudio.ini changing the value for [Tool-QtCreator] command:

[Tool-QtCreator]
command=C:\\Qt\\Qt5.12.4\\Tools\\QtCreator\\bin\\qtcreator.exe‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

on macOS:

  1. In a Terminal window run: ~/Applications/ArcGIS/AppStudio/sdk/ideintegration/post-install-mac.sh
  2. Edit ~/.config/Esri/AppStudio.ini changing the value for [Tool-QtCreator] command:

[Tool-QtCreator]
command=/Users/stephenquan/Qt5.12.4/Qt Creator.app‍‍‍‍‍‍‍‍‍‍‍‍‍‍

on Linux:

  1. In a terminal window run: ~/Applications/ArcGIS/AppStudio/sdk/ideintegration/post-install-linux.sh
  2. Edit ~/.config/Esri/AppStudio.ini changing the value for [Tool-QtCreator] command:

[Tool-QtCreator]
command=/home/stephenquan/Qt5.12.4/Tools/QtCreator/bin/qtcreator.sh‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Stephen

DavidPuckett
Occasional Contributor

This method to update Qt Creator appears to no longer be valid. Is there another way to update Qt Creator? I'd really like to take advantage of new components like Calendar.

0 Kudos