[Development] Using qml.exe with a custom QML_ELEMENT plugin
Elias Steurer
kelteseth at googlemail.com
Thu Oct 26 14:57:18 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);
}
did the trick. I will see if I will get to setup the tedious
contribution process going. Should I create a feature issue for this?
Then we could continue the discussion there.
Cheers,
Eli
On 25/10/2023 14:47, Ulf Hermann via Development wrote:
>> Adding a command line option to add dll search paths via
>> _wpuntenv_s(L"PATH", ...) or SetDLLDirectory(L"...") into qml.exe
>> would also work, right?
>
> I didn't know this exists. You'd have to add a lot of directories,
> though, since it doesn't want to see the QML import path but the paths
> to the individual modules I guess.
>
> If you have a solution in mind, feel free to push a change to
> https://codereview.qt-project.org and add me as reviewer. It would be
> nice to make this work.
More information about the Development
mailing list