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. How to add file browsing facility to my application?

How to add file browsing facility to my application?

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 4.7k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    soliman
    wrote on last edited by
    #1

    Hi All,

    I'm new to Qt. I want to add file browsing facility to my application.
    Is there any plugin or ready code to do this?
    Thank you

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      There is a ready to use native or Qt folder and file selection dialogues, and you can also easily implement a file browser by using standard components like QTreeView and QListView with the addition of minimum custom code. There is also QFileSystemModel and a bunch of other classes.

      Take a look here:
      http://www.voidrealms.com/viewtutorial.aspx?id=61

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pke62
        wrote on last edited by
        #3

        From Qt Assistant:

        The QFileDialog class provides a dialog that allow users to select files or directories.

        The QFileDialog class enables a user to traverse the file system in order to select one or many files or a directory.

        The easiest way to create a QFileDialog is to use the static functions. On Windows, Mac OS X, KDE and GNOME, these static functions will call the native file dialog when possible.

        • Phil
        1 Reply Last reply
        0
        • K Offline
          K Offline
          KA51O
          wrote on last edited by
          #4

          QFileDialogs static functions should be what you're looking for, like "getOpenFileName(..)":https://qt-project.org/doc/qt-4.8/qfiledialog.html#getOpenFileName

          1 Reply Last reply
          0
          • S Offline
            S Offline
            soliman
            wrote on last edited by
            #5

            Thank you all for your replies , but i need a widget to embed it in my Window.
            I think that i am going to write it myself using QFileSystemModel.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              KA51O
              wrote on last edited by
              #6

              In that case "this":https://qt-project.org/doc/qt-4.8/model-view-programming.html#using-views-with-an-existing-model might be helpful.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                soliman
                wrote on last edited by
                #7

                Thank you KA510

                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