Skip to content

Commit f590c5d

Browse files
committed
FilterModel: Fix invisible vertical header
1 parent b6038e6 commit f590c5d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/VdcEditorWindow.ui

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@
7676
<property name="sortingEnabled">
7777
<bool>true</bool>
7878
</property>
79+
<attribute name="verticalHeaderVisible">
80+
<bool>true</bool>
81+
</attribute>
7982
</widget>
8083
</item>
8184
</layout>
@@ -120,7 +123,7 @@
120123
<x>0</x>
121124
<y>0</y>
122125
<width>976</width>
123-
<height>20</height>
126+
<height>18</height>
124127
</rect>
125128
</property>
126129
<property name="nativeMenuBar">

src/model/FilterModel.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ QVariant FilterModel::data(const QModelIndex &index, int role) const
143143
}
144144

145145
QVariant FilterModel::headerData(int section, Qt::Orientation orientation, int role) const {
146+
if (role == Qt::DisplayRole) {
147+
if (orientation == Qt::Vertical) {
148+
// Render row number in vertical header rows
149+
return section;
150+
}
151+
}
152+
146153
if (orientation != Qt::Horizontal || role != Qt::DisplayRole) return {};
147154
switch (section) {
148155
case Type: return "Type";

0 commit comments

Comments
 (0)