diff --git a/src/calibre/gui2/preferences/main.py b/src/calibre/gui2/preferences/main.py index 3dbc0f8537..45117286d6 100644 --- a/src/calibre/gui2/preferences/main.py +++ b/src/calibre/gui2/preferences/main.py @@ -5,14 +5,14 @@ __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' -import textwrap +import textwrap, re from functools import partial from collections import OrderedDict from PyQt5.Qt import (QMainWindow, Qt, QIcon, QStatusBar, QFont, QWidget, QScrollArea, QStackedWidget, QVBoxLayout, QLabel, QFrame, QKeySequence, QToolBar, QSize, pyqtSignal, QPixmap, QToolButton, QAction, - QDialogButtonBox, QHBoxLayout) + QDialogButtonBox, QHBoxLayout, QStatusTipEvent) from calibre.constants import __appname__, __version__, islinux from calibre.gui2 import (gprefs, min_available_height, available_width, @@ -258,6 +258,12 @@ class Preferences(QMainWindow): if plugin is not None: self.show_plugin(plugin) + def event(self, ev): + if ev.type() == ev.StatusTip: + msg = re.sub(r'', ' ', ev.tip()) + ev = QStatusTipEvent(msg) + return QMainWindow.event(self, ev) + def run_wizard(self): self.close() self.run_wizard_requested.emit()