From c57d7567c4f8e89f9fa562c0e3361670391974ee Mon Sep 17 00:00:00 2001 From: Krzysztof Starecki Date: Wed, 2 Jan 2019 18:47:50 +0100 Subject: Tweak download tab column resizing --- src/downloadlistwidget.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/downloadlistwidget.h') diff --git a/src/downloadlistwidget.h b/src/downloadlistwidget.h index 0002e2b4..4776d259 100644 --- a/src/downloadlistwidget.h +++ b/src/downloadlistwidget.h @@ -28,6 +28,7 @@ along with Mod Organizer. If not, see . #include #include #include +#include #include @@ -50,6 +51,18 @@ private: DownloadListSortProxy *m_SortProxy; }; +class DownloadListHeader : public QHeaderView +{ + Q_OBJECT + +public: + explicit DownloadListHeader(Qt::Orientation orientation, QWidget *parent = nullptr) : QHeaderView(orientation, parent) {} + void customResizeSections(); + +private: + void mouseReleaseEvent(QMouseEvent *event) override; +}; + class DownloadListWidget : public QTreeView { Q_OBJECT @@ -101,6 +114,8 @@ private: DownloadManager *m_Manager; DownloadList *m_SourceModel = 0; int m_ContextRow; + + void resizeEvent(QResizeEvent *event); }; #endif // DOWNLOADLISTWIDGET_H -- cgit v1.3.1