mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Fix keyboard not working on OS X
This commit is contained in:
parent
ea37595cd5
commit
aa0521803f
@ -56,6 +56,7 @@ class BlockingJob(QWidget):
|
||||
l.addStretch(10)
|
||||
self.setVisible(False)
|
||||
self.text = ''
|
||||
self.setFocusPolicy(Qt.NoFocus)
|
||||
|
||||
def start(self):
|
||||
self.setGeometry(0, 0, self.parent().width(), self.parent().height())
|
||||
@ -72,6 +73,10 @@ class BlockingJob(QWidget):
|
||||
self.pi.stopAnimation()
|
||||
self.setVisible(False)
|
||||
self.parent().setEnabled(True)
|
||||
# The following line is needed on OS X, because of this bug:
|
||||
# https://bugreports.qt-project.org/browse/QTBUG-34371 it causes
|
||||
# keyboard events to no longer work
|
||||
self.parent().setFocus(Qt.OtherFocusReason)
|
||||
|
||||
def job_done(self, callback, job):
|
||||
del job.callback
|
||||
|
Loading…
x
Reference in New Issue
Block a user