[GH-ISSUE #183] FileDialog.open() does not work from Qml.Net #119

Closed
opened 2026-05-05 11:05:36 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @ujjaldas89 on GitHub (Feb 5, 2020).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/183

Has FileDialog component has been handled. When I execute filedialog.open in the qml file .net shows as unrecognized command.

Originally created by @ujjaldas89 on GitHub (Feb 5, 2020). Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/183 Has FileDialog component has been handled. When I execute filedialog.open in the qml file .net shows as unrecognized command.
Author
Owner

@pauldotknopf commented on GitHub (May 30, 2020):

I'm sorry for the delay here. Can you provide more info? What do you mean by "unrecognized command"?

<!-- gh-comment-id:636264297 --> @pauldotknopf commented on GitHub (May 30, 2020): I'm sorry for the delay here. Can you provide more info? What do you mean by "unrecognized command"?
Author
Owner

@ujjaldas89 commented on GitHub (Aug 2, 2020):

I figured out a way how to make it work. I am sorry for the delayed response.

<!-- gh-comment-id:667622771 --> @ujjaldas89 commented on GitHub (Aug 2, 2020): I figured out a way how to make it work. I am sorry for the delayed response.
Author
Owner

@vadi2 commented on GitHub (Aug 2, 2020):

How did you make it work?

<!-- gh-comment-id:667636288 --> @vadi2 commented on GitHub (Aug 2, 2020): How did you make it work?
Author
Owner

@ujjaldas89 commented on GitHub (Aug 2, 2020):

If paul allows. Then I can actually upload my project. This will also add another example project into the repository.

<!-- gh-comment-id:667682619 --> @ujjaldas89 commented on GitHub (Aug 2, 2020): If paul allows. Then I can actually upload my project. This will also add another example project into the repository.
Author
Owner

@pauldotknopf commented on GitHub (Aug 2, 2020):

Upload it here, and I'll see if anything should be added to our examples.

<!-- gh-comment-id:667685016 --> @pauldotknopf commented on GitHub (Aug 2, 2020): Upload it here, and I'll see if anything should be added to our examples.
Author
Owner

@ujjaldas89 commented on GitHub (Aug 16, 2020):

Example Project.zip
@pauldotknopf
I have attached the complete project.
@vadi2
FileDialog { id: fileDialog selectMultiple: true selectExisting: true title: "Choose .tcf file(s)..." **visible: true** nameFilters: [ "Tcf files (*.tcf)" ] onAccepted: fileDialogAccepted(fileDialog.fileUrl, fileDialog.fileUrls) } Component.onCompleted: { console.log("Load completed") **fileDialog.visible = false** }

@vadi2 : The problem was if Visible is not set to true the FileDialog.Open won't work. But if Visible is set to true the FileDialog pops up after the Component load is complete. So, after some trial and error, I figured out that is the Visible is set to false on the Component load everything goes back to normal.

I regret the delay in response.

<!-- gh-comment-id:674524232 --> @ujjaldas89 commented on GitHub (Aug 16, 2020): [Example Project.zip](https://github.com/qmlnet/qmlnet/files/5080664/Example.Project.zip) @pauldotknopf I have attached the complete project. @vadi2 ` FileDialog { id: fileDialog selectMultiple: true selectExisting: true title: "Choose .tcf file(s)..." **visible: true** nameFilters: [ "Tcf files (*.tcf)" ] onAccepted: fileDialogAccepted(fileDialog.fileUrl, fileDialog.fileUrls) } Component.onCompleted: { console.log("Load completed") **fileDialog.visible = false** }` @vadi2 : The problem was if Visible is not set to true the FileDialog.Open won't work. But if Visible is set to true the FileDialog pops up after the Component load is complete. So, after some trial and error, I figured out that is the Visible is set to false on the Component load everything goes back to normal. I regret the delay in response.
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#119
No description provided.