mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont fail if a QPushButton gets added to the toolbars somehow
This commit is contained in:
parent
25e10f1032
commit
36b63758a2
@ -225,9 +225,10 @@ class ToolBar(QToolBar): # {{{
|
||||
if ch is None:
|
||||
ch = self.child_bar.widgetForAction(ac)
|
||||
ch.setCursor(Qt.PointingHandCursor)
|
||||
ch.setAutoRaise(True)
|
||||
if hasattr(ch, 'setText') and hasattr(ch, 'text'):
|
||||
self.all_widgets.append(ch)
|
||||
if hasattr(ch, 'setAutoRaise'): # is a QToolButton or similar
|
||||
ch.setAutoRaise(True)
|
||||
m = ac.menu()
|
||||
if m is not None:
|
||||
if menu_mode is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user