Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Folder Chooser Dialog
QtWS25 Last Chance

Folder Chooser Dialog

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 17.4k 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.
  • L Offline
    L Offline
    leafjungle
    wrote on last edited by
    #1

    in QFileDialog, I have to choose a file. But how can I choose a folder?

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      "QFileDialog::getExistingDirectory()":http://qt-project.org/doc/qt-4.8/qfiledialog.html#getExistingDirectory
      or
      use "options":http://qt-project.org/doc/qt-4.8/qfiledialog.html#options-prop and set QFileDialog::ShowDirsOnly

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • L Offline
        L Offline
        leafjungle
        wrote on last edited by
        #3

        Thank you~

        While the "Folder Chooser Dialog" is quite different with File Chooser Dialog.

        [quote author="raven-worx" date="1381299378"]"QFileDialog::getExistingDirectory()":http://qt-project.org/doc/qt-4.8/qfiledialog.html#getExistingDirectory
        or
        use "options":http://qt-project.org/doc/qt-4.8/qfiledialog.html#options-prop and set QFileDialog::ShowDirsOnly[/quote]

        1 Reply Last reply
        0
        • L Offline
          L Offline
          leafjungle
          wrote on last edited by
          #4

          I find that the dialog uses English as default, how can I change it to other languages?
          [quote author="raven-worx" date="1381299378"]"QFileDialog::getExistingDirectory()":http://qt-project.org/doc/qt-4.8/qfiledialog.html#getExistingDirectory
          or
          use "options":http://qt-project.org/doc/qt-4.8/qfiledialog.html#options-prop and set QFileDialog::ShowDirsOnly[/quote]

          1 Reply Last reply
          0
          • raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            which one do you use now?
            The static version is the one from the OS and thus has the same language.
            If you created an instance it's ordinary dialog composed of QWidgets. Thus you will need to "install a translator":http://qt-project.org/doc/qt-4.8/qtranslator.html#details to your application in order to get the dialog translated correctly (and load the Qt translation file).

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            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