Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Trouble using QML FileDialog
Forum Updated to NodeBB v4.3 + New Features

Trouble using QML FileDialog

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 613 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    drmhkelley
    wrote on last edited by
    #1

    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.

    1. 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:
    CallContext:[\CAutoDestItemsEnum::Next\CAutoDestItemsEnum::_EnsureInit]
    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.

    1. 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

      FileDialog {
      id: fileDialog
      title: "Choose a file"
      folder: "./"
      modality: Qt.ApplicationModal
      nameFilters: [ "CSV files (.csv)", "All files ()" ]
      selectedNameFilter: "CSV files (*.csv)"

      onAccepted:{
      doSomething
      }
      onRejected: {
      doSomethingElse
      }
      Component.onCompleted: {
      maybeDoSomething
      }
      }

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved