[GH-ISSUE #86] Support for Qt Quick Controls 2 Configuration File #54

Closed
opened 2026-05-05 11:02:27 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @TripleWhy on GitHub (Dec 21, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/86

How can I use a Qt Quick Controls 2 Configuration File?
There is no support for the qt resource system, but I can use QT_QUICK_CONTROLS_CONF. It works fine when I specify that as an environment variable for the run configuration in my IDE, but not when I use System.Environment.SetEnvironmentVariable("QT_QUICK_CONTROLS_CONF", ...); as the first line of C# code.
What am I missing?

Originally created by @TripleWhy on GitHub (Dec 21, 2018). Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/86 How can I use a [Qt Quick Controls 2 Configuration File](http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html)? There is no support for the qt resource system, but I can use [QT_QUICK_CONTROLS_CONF](http://doc.qt.io/qt-5/qtquickcontrols2-environment.html). It works fine when I specify that as an environment variable for the run configuration in my IDE, but not when I use `System.Environment.SetEnvironmentVariable("QT_QUICK_CONTROLS_CONF", ...);` as the first line of C# code. What am I missing?
Author
Owner

@pauldotknopf commented on GitHub (Dec 23, 2018):

I've noticed that sometimes, environment variables don't work as expected, unless you use Qt's qputenv method. That method is available in C# using Qt.PutEnv(name, value).

Try that and tell me if it works. If not, I'll dig in more.

<!-- gh-comment-id:449610102 --> @pauldotknopf commented on GitHub (Dec 23, 2018): I've noticed that sometimes, environment variables don't work as expected, unless you use Qt's ```qputenv``` method. That method is available in C# using ```Qt.PutEnv(name, value)```. Try that and tell me if it works. If not, I'll dig in more.
Author
Owner

@TripleWhy commented on GitHub (Dec 23, 2018):

That works a lot better, thanks.

<!-- gh-comment-id:449652237 --> @TripleWhy commented on GitHub (Dec 23, 2018): That works a lot better, thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/qmlnet#54
No description provided.