[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [zanshin] src/widgets: Make sure the column is resized with the tree view
From:       Kevin Ottens <ervin () kde ! org>
Date:       2016-11-23 8:23:15
Message-ID: E1c9Spn-00066t-7v () code ! kde ! org
[Download RAW message or body]

Git commit 9c4b3f2f2d983666d1177e0ecb0dcb168175321e by Kevin Ottens.
Committed on 23/11/2016 at 08:23.
Pushed by ervin into branch 'master'.

Make sure the column is resized with the tree view

Summary:
Found a bug while working on the delegate, it turns out that a hidden
header view doesn't resize the column width when the tree view is itself
resized. Forces it to happen.

Reviewers: bensi, franckarrecot, dfaure

Differential Revision: https://phabricator.kde.org/D2737

M  +6    -0    src/widgets/pageview.cpp

https://commits.kde.org/zanshin/9c4b3f2f2d983666d1177e0ecb0dcb168175321e

diff --git a/src/widgets/pageview.cpp b/src/widgets/pageview.cpp
index 485cb23..34ee513 100644
--- a/src/widgets/pageview.cpp
+++ b/src/widgets/pageview.cpp
@@ -62,6 +62,12 @@ protected:
 =

         QTreeView::keyPressEvent(event);
     }
+
+    void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE
+    {
+        header()->resizeSection(0, event->size().width());
+        QTreeView::resizeEvent(event);
+    }
 };
 }
 =


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic