Fix a regression in 5.0 that caused performance of dialogs that contain title/series/tags edit fields to be very poor with large libraries. Fixes #1898221 [Menu items on the Convert Books Box are slow to respond](https://bugs.launchpad.net/calibre/+bug/1898221)

Apparently in Qt 5.15 Qt queries size hints for all items in a list view
unless setuniformitemsizes is set.
This commit is contained in:
Kovid Goyal 2020-10-13 09:45:57 +05:30
parent 66ae34e2d3
commit 0e37c78ed9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -94,6 +94,7 @@ class Completer(QListView): # {{{
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.setSelectionBehavior(self.SelectRows)
self.setSelectionMode(self.SingleSelection)
self.setUniformItemSizes(True)
self.setAlternatingRowColors(True)
self.setModel(CompleteModel(self, sort_func=sort_func, strip_completion_entries=strip_completion_entries))
self.setMouseTracking(True)