In MergeView, replace QTableWidget with QTableView with custom model (#266,#217)

QTableWidget was a major bottleneck for large merge sources (#217).  This is because a QTableWidgetItem needed to be created for every field in every record of the merge data, whether they are being displayed or not.  This was not a problem for small merge sources (only a few dozen records max), however for larger data sets this would severely affect performance and make the application unresponsive.  QTableView only renders the fields and records currently visible.
This commit is contained in:
Jaye Evins
2025-12-10 13:17:25 -05:00
committed by GitHub
parent f1e50d8574
commit 6c10571ba4
6 changed files with 291 additions and 161 deletions
+22 -7
View File
@@ -95,13 +95,6 @@
<string>Records</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QTableWidget" name="recordsTable">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@@ -140,6 +133,28 @@
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QTableView" name="recordsTableView">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="textElideMode">
<enum>Qt::ElideRight</enum>
</property>
<attribute name="horizontalHeaderCascadingSectionResizes">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
</item>