Fix the unified title and toolbar on Mac tweak causing calibre to fail to work because of a bug in PyQt5

This commit is contained in:
Kovid Goyal 2014-08-23 16:22:21 +05:30
parent 702f255cf5
commit 6866597563

View File

@ -297,7 +297,10 @@ class MainWindowMixin(object): # {{{
# This is disabled because it introduces various toolbar related bugs
# The width of the toolbar becomes the sum of both toolbars
if tweaks['unified_title_toolbar_on_osx']:
self.setUnifiedTitleAndToolBarOnMac(True)
try:
self.setUnifiedTitleAndToolBarOnMac(True)
except AttributeError:
pass # PyQt5 seems to be missing this property
l = self.centralwidget.layout()
l.addWidget(self.search_bar)