[GH-ISSUE #133] How to set QCoreApplication organizationName and organizationDomain? #79

Closed
opened 2026-05-05 11:03:44 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @vadi2 on GitHub (May 16, 2019).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/133

The FileDialog would like these two properties to be set:

file:///.../DefaultFileDialog.qml:102:33: QML Settings: Failed to initialize QSettings instance. Status code is: 1
file:///.../DefaultFileDialog.qml:102:33: QML Settings: The following application identifiers have not been set: QVector("organizationName", "organizationDomain")

However the bindings don't seem to be available for this (or I'm using it wrong?):

app.setOrganizationName("Some Company");
app.setOrganizationDomain("somecompany.com");
Originally created by @vadi2 on GitHub (May 16, 2019). Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/133 The [FileDialog](https://doc.qt.io/qt-5/qml-qtquick-dialogs-filedialog.html) would like these two properties to be set: ``` file:///.../DefaultFileDialog.qml:102:33: QML Settings: Failed to initialize QSettings instance. Status code is: 1 file:///.../DefaultFileDialog.qml:102:33: QML Settings: The following application identifiers have not been set: QVector("organizationName", "organizationDomain") ``` However the bindings don't seem to be available for this (or I'm using it wrong?): ```c# app.setOrganizationName("Some Company"); app.setOrganizationDomain("somecompany.com"); ```
Author
Owner

@pauldotknopf commented on GitHub (May 17, 2019):

QCoreApplication.OrganizationDomain = "domain";
QCoreApplication.OrganizationName = "name";
<!-- gh-comment-id:493295527 --> @pauldotknopf commented on GitHub (May 17, 2019): ```csharp QCoreApplication.OrganizationDomain = "domain"; QCoreApplication.OrganizationName = "name"; ```
Author
Owner

@vadi2 commented on GitHub (May 17, 2019):

It didn't help :( as a test, stick this into Main.qml of Features:

import QtQuick.Dialogs 1.3
// ...

FileDialog {
    id: scopePicker
    title: "Folder to act as the scope (context) for validation"
    selectFolder: true
}
<!-- gh-comment-id:493327918 --> @vadi2 commented on GitHub (May 17, 2019): It didn't help :( as a test, stick this into `Main.qml` of `Features`: ```js import QtQuick.Dialogs 1.3 // ... FileDialog { id: scopePicker title: "Folder to act as the scope (context) for validation" selectFolder: true }
Author
Owner

@pauldotknopf commented on GitHub (Jun 10, 2019):

This worked for me.

Can you show me your Program.cs file where you are putting it?

<!-- gh-comment-id:500285441 --> @pauldotknopf commented on GitHub (Jun 10, 2019): This worked for me. Can you show me your ```Program.cs``` file where you are putting it?
Author
Owner

@vadi2 commented on GitHub (Jun 12, 2019):

I made a test case and it does work indeed in there. My bad!

<!-- gh-comment-id:501270532 --> @vadi2 commented on GitHub (Jun 12, 2019): I made a test case and it does work indeed in there. My bad!
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#79
No description provided.