Add filesystem widget

This commit is contained in:
2021-04-20 12:00:30 +02:00
parent 47360b5227
commit 1ba6a0ff19
7 changed files with 203 additions and 31 deletions
+23
View File
@@ -0,0 +1,23 @@
#ifndef FILESYSTEMWIDGET_H
#define FILESYSTEMWIDGET_H
#include <QWidget>
#include <QFileSystemModel>
#include <QListView>
class FilesystemWidget : public QWidget
{
Q_OBJECT
QListView *m_listView;
QAbstractItemModel *m_model;
public:
explicit FilesystemWidget(QAbstractItemModel *model, QWidget *parent = nullptr);
void setDir(const QString &dir);
private slots:
void selectFile(int row);
void fileClicked(const QModelIndex &index);
signals:
void fileSelected(int row);
};
#endif // FILESYSTEMWIDGET_H