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. QFileSystemModel and QTableView get more information about files
Forum Updated to NodeBB v4.3 + New Features

QFileSystemModel and QTableView get more information about files

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 1.7k Views 2 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.
  • N Offline
    N Offline
    nammidd
    wrote on last edited by
    #1

    Hello, I'm new in Qt. I create QFileSystemModel and place it into QTableView, how can I get additional columns with information about files, like owner, group, permissions etc?

    JonBJ 1 Reply Last reply
    0
    • N nammidd

      Hello, I'm new in Qt. I create QFileSystemModel and place it into QTableView, how can I get additional columns with information about files, like owner, group, permissions etc?

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Take a look at QFileSystemModel::fileInfo.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        N 1 Reply Last reply
        1
        • SGaistS SGaist

          Hi and welcome to devnet,

          Take a look at QFileSystemModel::fileInfo.

          N Offline
          N Offline
          nammidd
          wrote on last edited by nammidd
          #4

          @SGaist said in QFileSystemModel and QTableView get more information about files:

          Hi and welcome to devnet,

          Take a look at QFileSystemModel::fileInfo.

          This function will just return information about single file, my request was how to add additional columns with additional information about files.

          Generally i need something like this
          0_1519868717024_1.png

          K JonBJ 2 Replies Last reply
          0
          • N nammidd

            @SGaist said in QFileSystemModel and QTableView get more information about files:

            Hi and welcome to devnet,

            Take a look at QFileSystemModel::fileInfo.

            This function will just return information about single file, my request was how to add additional columns with additional information about files.

            Generally i need something like this
            0_1519868717024_1.png

            K Offline
            K Offline
            kenchan
            wrote on last edited by
            #5

            @nammidd
            And generally that is what the tree view is for. It is described in the documentation that @SGaist has indicated.
            Do come back with more questions if you get stuck :-)

            1 Reply Last reply
            2
            • N nammidd

              @SGaist said in QFileSystemModel and QTableView get more information about files:

              Hi and welcome to devnet,

              Take a look at QFileSystemModel::fileInfo.

              This function will just return information about single file, my request was how to add additional columns with additional information about files.

              Generally i need something like this
              0_1519868717024_1.png

              JonBJ Online
              JonBJ Online
              JonB
              wrote on last edited by
              #6

              @nammidd said in QFileSystemModel and QTableView get more information about files:

              This function will just return information about single file, my request was how to add additional columns with additional information about files.

              To be clear, although this is information about one file at a time, this is how you get the information for each file to put in the table view. There is no one call to get "all information about all files", the information is stored against each file individually. Then you create your QTableView to have columns for each desired attribute in QFileInfo, and you end up with what you are looking for.

              1 Reply Last reply
              1

              • Login

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