[Development] Using qml.exe with a custom QML_ELEMENT plugin
Ulf Hermann
ulf.hermann at qt.io
Thu Oct 26 15:14:22 CEST 2023
> I can confirm a simple:
>
> for (const QString &importPath : parser.values(importOption)){
> QByteArray path = qgetenv("PATH");
> QByteArray newPath = importPath.toLocal8Bit() + ";";
> newPath += path;
> qputenv("PATH", newPath);
> qDebug() << "Modified PATH:" << qgetenv("PATH");
> e.addImportPath(importPath);
> }
I don't quite understand why this works. Can you show the directory
layout in the respective import path? Where do the files end up?
In any case, it should be specific to windows, so please add an "#ifdef
Q_OS_WIN". The best place to discuss this is actually the code review
system. You don't necessarily have to open a feature ticket.
cheers,
Ulf
More information about the Development
mailing list