diff --git a/src/ViewWidgets/CustomCommandWidgetController.cc b/src/ViewWidgets/CustomCommandWidgetController.cc index e5ca9958308875fd85df4480be84750a266bda5b..1cc7b1000a3aca35654fda3d1e5d6da5f83cecec 100644 --- a/src/ViewWidgets/CustomCommandWidgetController.cc +++ b/src/ViewWidgets/CustomCommandWidgetController.cc @@ -27,6 +27,7 @@ #include "QGCFileDialog.h" #include +#include const char* CustomCommandWidgetController::_settingsKey = "CustomCommand.QmlFile"; @@ -64,7 +65,8 @@ void CustomCommandWidgetController::selectQmlFile(void) _customQmlFile.clear(); settings.remove(_settingsKey); } else { - _customQmlFile = QString("file:%1").arg(qmlFile); + QUrl url = QUrl::fromLocalFile(qmlFile); + _customQmlFile = url.toString(); settings.setValue(_settingsKey, _customQmlFile); }