Use a comprehension instead of map.
Fix errors with hover events in new version of Qt.