#ifndef STANDARDMANAGEVIEW_H #define STANDARDMANAGEVIEW_H #include #include #include #include class CDelegate : public QStyledItemDelegate { Q_OBJECT public: CDelegate(QObject *parent) : QStyledItemDelegate(parent) { } protected: QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const { QSize size = QStyledItemDelegate::sizeHint(option, index); return QSize(size.width(), 35); } }; class StandardManageView : public QWidget { Q_OBJECT public: explicit StandardManageView(QWidget *parent = nullptr); signals: private: QFileSystemModel *m_fileModel; QTreeView *m_treeView; QString m_dir; // QWidget interface protected: virtual void resizeEvent(QResizeEvent *event) override; private slots: void onDoubleClick(const QModelIndex &index); }; #endif // STANDARDMANAGEVIEW_H