Can QFileDialog act like the OS File explore Finder for example?



  • Hi Folks,

    Can QFileDialog open a file like Finder? I want to be able double click and have the OS open the file. I generate Excel files and then I want the user to open the file(s) in Excel.

    I know you can do this: QDesktopServices::openUrl(QUrl("file:///" +fn) );
    but i prefer not to.

    i am currently using
    QDesktopServices::openUrl(QUrl("file:///" + WhereToPutReport))
    to get the behavior I want.

    TIA
    FM


  • Lifetime Qt Champion

    Hi,

    By default QFileDialog uses the OS specific file dialog so you already have the original behavior. But a file dialog is not a finder/explorer window, it's not its purpose


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.