Display Audio/Video files details in ListView (Qt)
-
I am newbie in Qt. I am currently working on an app where I have 2 widgets in my .ui file.
In my first widget, I have a treeview which displays the FileSystem i.e. all the drives in my system C:, D: E: etc. In my Second widget, I have a listview which should display details of files.
When I click on one of the drives in treeview, it should first search for the audio and video files present in the drive and then display them in a Listview which is part of my 2nd widget.
I am able to get the FileSystem in .cpp file as follows:
@m_SystemModel = new QFileSystemModel(this);
m_SystemModel->setRootPath(QDir::homePath());
ui->treeView->setModel(m_SystemModel);for(int i = 1; i < m_SystemModel->columnCount(); i++)
ui->treeView->hideColumn(i);@where @QFileSystemModel *m_SystemModel;@ is present in .h file
Here is the sample image of 2 widgets:!https://lh6.googleusercontent.com/-go7DnSkI4fA/UKX7ZVHXI1I/AAAAAAAAABs/s3KSyXhsmFw/s662/untitled.jpg(Sample Image)!
The second widget on which I have placed a listview should display the audio and video files details.
Please help :)