make square version of thumb for icon view

This commit is contained in:
itsmattkc
2018-12-24 17:31:40 +11:00
parent ceb0078b2e
commit 4992b189f4
7 changed files with 59 additions and 14 deletions
+9
View File
@@ -0,0 +1,9 @@
#include "otreeview.h"
OTreeView::OTreeView(QWidget *parent) : QTreeView(parent) {
setSortingEnabled(true);
sortByColumn(0, Qt::AscendingOrder);
setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(show_context_menu()));
connect(this, SIGNAL(clicked(const QModelIndex&)), this, SLOT(item_click(const QModelIndex&)));
}
+16
View File
@@ -0,0 +1,16 @@
#ifndef OTREEVIEW_H
#define OTREEVIEW_H
#include <QTreeView>
#include "ui/sourcetable.h"
class OTreeView : public QTreeView {
Q_OBJECT
public:
OTreeView(QWidget* parent = 0);
private:
};
#endif // OTREEVIEW_H