Questions tagged [qfilesystemmodel]

A QFileSystemModel is a class from the Qt toolkit which provides a data model for the local filesystem.

The QFileSystemModel class gives access to the local filesystem. It provides functions for renaming and removing files and directories, and for creating new directories. In the simplest case, it can be used with a suitable display widget (such as a QTreeView) as part of a browser or filter.

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

187 questions
0
votes
1 answer

Qt Asynchronous Display with Asynchronous QFileSystemModel

I am trying to implement Custom File Explorer that fetches metadata of the specific(in house file system) file and displays all these data along with files. For this task I have implemented custom QFileSystemModel that takes care of this. Now, I…
Minhaz
  • 15
  • 5
0
votes
3 answers

Overwrite data and setData in Qt's QFileSystemModel

What I'am trying to do: Overwrite QFileSystemModel's setData and data to implement Caching of pictures in the shown directory. I use a QListView for testing purpose. Here is the relevant code: My Class with QFileSystemModel as parent:…
Herrbert
  • 113
  • 1
  • 2
  • 9
0
votes
0 answers

How do I view any file in Qt's TreeView?

Currently, I have this code: QFileSystemModel *model = new…
JVE999
  • 3,327
  • 10
  • 54
  • 89
0
votes
1 answer

Sorting by column

I try to do something that can certainly be done easily but I can find a way. I have a QtreeView displaying a QFileSystemModel that I custumized with two additionnal columns (sections). I work with directories named by date (YYYYMMDDHHMMSS+num).…
user3046026
  • 149
  • 1
  • 14
0
votes
1 answer

QTreeWidget and QFileSystemModel

Please tell me how to connect to QFileSystemModel QTreeWidget simply function SetModel() not support QFileSystemModel but only QAbstractItemModel, but I need to work with files and for these purposes QAbstractItemModel not fit, I would like to open…
user2759544
  • 181
  • 1
  • 10
0
votes
1 answer

find(Search) particular named file from QFilesystemmodel

I am newbie in Qt. I am using QFileSystemModel in QTreeview to explore the contents of the drives. I want to find a particular named file from anyone drive using this QFileSystemModel. Now, Is there any way to find that particular file from this…
Ashish
  • 219
  • 2
  • 6
  • 22
0
votes
1 answer

how to avoid leading spaces in qtreeview with qfilesystem model header text?

I am using QFileSystem Model with QTreeView, and I am able to change the text by sub classing QFileSystem model like this... QVariant customFileSystemModel::headerData(int section, Qt::Orientation…
Prady
  • 663
  • 3
  • 11
  • 28
0
votes
1 answer

QFileSystemModel and QTreeView - strange behavior when resetting view

I wrote this on official forums of Qt, but it seems dead, so I am going to copy-paste it here. I am writing small program for copying files. I use QTreeView and I have inherited from QFileSystemModel, so I was able to add checkboxes to every row in…
sobol6803
  • 420
  • 1
  • 5
  • 21
0
votes
1 answer

Qt5 C++: Add additional information to QFileSystemModel

I would like to save some additional data to QFileSystemModel as is file description and things like that. I already have an output window in which the user can enter some additional, not required data, but anyway I need to implement this if the…
user1257255
  • 1,161
  • 8
  • 26
  • 55
0
votes
1 answer

Qt5 C++: Remove item from QListView's model and how to count items

1. I'm trying to remove one of a few listed files from a QListView model. I'm using this code but it doesn't work: ui->listView->model()->removeRow(ui->viewFiles->currentIndex().row()); Same thing is if I…
user1257255
  • 1,161
  • 8
  • 26
  • 55
0
votes
0 answers

How to find an item in a QTreeView?

I understand that QTreeWidget has methods for finding an item, but since I want to use a QFileSystemModel, then I'm limited to QTreeView. However, I'd still like to be able to return all items from a QTreeView and place them into a list. I had…
Ci3
  • 4,632
  • 10
  • 34
  • 44
0
votes
1 answer

no matching function for call to QTreeView::setModel(modelClass (*)())'

I am new to QT. I am trying to create a simple file system browser. I have created a separate class for the model and the view class. Here they are: //modelClass.h #ifndef MODELCLASS_H #define MODELCLASS_H #include class…
0
votes
2 answers

Can folder color be changed in QTreeView when QFilesystemModel displays drives?

Well I have been working on a Qt app where I need to display Filesystem using QFilesystemModel.I have been able to display it as expected. Code: QFileSystemModel *model = new…
Gojira
  • 171
  • 4
  • 14
0
votes
1 answer

Using QFileSystemModel along QTreeView and QTreeWidgetItem

I have a "project structure", which is something like this. -Project Main File --Project Subfile 1 --Project Subfile 2 --Project Subfolder 1 ---Project Subfolder 2 ----Project Subfile 3 I'm using a QFileSystemModel to get the files on the specified…
0
votes
3 answers

Display Audio & Video Files In TreeView on Clicking Any Drive (QFileSystemModel)

I want to traverse the drives present in my system and search for audio/video files inside it. Basically traverse the sub directories and display the file inside the treeview. I have 2 tree views, One to display System Directories and other to…
StonedJesus
  • 397
  • 1
  • 5
  • 26
1 2 3
12
13