mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
fix crashes and corruption in column headers
set all columns to interactive at once to work around qt5 issues
This commit is contained in:
parent
f9d93fa888
commit
29026b08e2
1 changed files with 3 additions and 5 deletions
|
@ -717,11 +717,9 @@ by clicking on one on the left."""))
|
|||
|
||||
def setColumnSizes(self):
|
||||
hh = self.form.tableView.horizontalHeader()
|
||||
for i in range(len(self.model.activeCols)):
|
||||
if hh.visualIndex(i) == len(self.model.activeCols) - 1:
|
||||
hh.setResizeMode(i, QHeaderView.Stretch)
|
||||
else:
|
||||
hh.setResizeMode(i, QHeaderView.Interactive)
|
||||
hh.setResizeMode(QHeaderView.Interactive)
|
||||
hh.setResizeMode(hh.logicalIndex(len(self.model.activeCols)-1),
|
||||
QHeaderView.Stretch)
|
||||
# this must be set post-resize or it doesn't work
|
||||
hh.setCascadingSectionResizes(False)
|
||||
|
||||
|
|
Loading…
Reference in a new issue