From 3c816b2f11ddc66a78cdc6327ee102df46d1a552 Mon Sep 17 00:00:00 2001 From: glubsy Date: Wed, 15 Jul 2020 21:43:01 +0200 Subject: [PATCH] Fix computing and setting offset to 0 for tableview --- qt/details_table.py | 3 +-- qt/pe/details_dialog.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/qt/details_table.py b/qt/details_table.py index f02e479b..854a1595 100644 --- a/qt/details_table.py +++ b/qt/details_table.py @@ -7,7 +7,7 @@ # http://www.gnu.org/licenses/gpl-3.0.html from PyQt5.QtCore import Qt, QAbstractTableModel -from PyQt5.QtWidgets import QHeaderView, QTableView, QAbstractItemView +from PyQt5.QtWidgets import QHeaderView, QTableView from hscommon.trans import trget @@ -55,7 +55,6 @@ class DetailsTable(QTableView): self.setShowGrid(False) self.setWordWrap(False) - def setModel(self, model): QTableView.setModel(self, model) # The model needs to be set to set header stuff diff --git a/qt/pe/details_dialog.py b/qt/pe/details_dialog.py index dde2cfc7..43793bfb 100644 --- a/qt/pe/details_dialog.py +++ b/qt/pe/details_dialog.py @@ -105,7 +105,7 @@ class DetailsDialog(DetailsDialogBase): * self.tableModel.model.row_count() + self.tableView.verticalHeader().sectionSize(0) # Windows seems to add a few pixels more to the table somehow - + 5 if ISWINDOWS else 0) + + (5 if ISWINDOWS else 0)) DetailsDialogBase.show(self) self.ensure_same_sizes() self._update()