Trouble using QML FileDialog
I'm having trouble getting started with QML FileDialog. There are two issues, presumably unrelated. The first is pretty long, but the second is the important one.
- As a starting point, I used the standard example: quickcontrols/dialogs/systemdialogs. It seems to work as expected, but I get the following errors.
One of the form: onecore\com\combase\inc\comcataloghelpers.hpp(67)\combase.dll!00007FFD3581FE7A: (caller: 00007FFD3581E2D5) ReturnHr(1) tid(230ac) 80004002 No such interface supported
mincore\com\oleaut32\dispatch\ups.cpp(2125)\OLEAUT32.dll!00007FFD35B44D32: (caller: 00007FFD35B44E96) ReturnHr(1) tid(237d8) 8002801D Library not registered.
onecoreuap\shell\windows.storage\drivfldr.cpp(1420)\windows.storage.dll!00007FFD351B7CD9: (caller: 00007FFD350B0523) ReturnHr(1) tid(22d00) 8007000F The system cannot find the drive specified.
Then about a bazillion of the form:
onecoreuap\shell\windows.storage\regfldr.cpp(1239)\windows.storage.dll!00007FFD350B3593: (caller: 00007FFD350AFC5E) ReturnHr(2) tid(22d00) 8007000F The system cannot find the drive specified.
Then another bazillion of the form:
onecoreuap\shell\windows.storage\regfldr.cpp(1239)\windows.storage.dll!00007FFD350B3593: (caller: 00007FFD350AFC5E) ReturnHr(537) tid(21ab0) 8007000F The system cannot find the drive specified.
I don't have a clue what these mean, and even less of a clue whether or not I should care, since the example seems to work.
I haven't yet correctly figured out the proper syntax for incorporating the pieces in my code. What I expected was to have a section something like
title: "Choose a file"
nameFilters: [ "CSV files (.csv)", "All files ()" ]
selectedNameFilter: "CSV files (*.csv)"
Then at the appropriate place in my code do something like:
fileDialog.open() var fname = fileDialog.fileUrl
While this "works", it does NOT exhibit the expected behavior. What happens is that when I invoke the wrapping module, fileDialog pops up all on its own before the real code in the module. When I invoke the code that should popup the dialog, it runs straight through, with fname being an object I can't inspect in the Qt debugger. After all the relevant following code completes, the dialog pops up again.
I'll admit great confusion about the correct modality, but none of the choices seem to affect the gross behavior.
Any clue what I might be missing?