Environment variables inside the main fuction
Unsolved
General and Desktop
-
I was watching this video: QtWS15- Effective QML, and speaker (Thomas) said that you cannot set environment variables inside the
main
function.But I have them there and they do work:
int main(int argc, char *argv[]) { // here's the environment variable qputenv("QSG_VISUALIZE", "overdraw"); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QLatin1String("qrc:/main.qml"))); return app.exec(); }
Has something changed for the last year? Or I don't understand something?