Quit gracefully after closing the main window.
This commit is contained in:
parent
96347646bb
commit
44c2cce96e
1 changed files with 4 additions and 0 deletions
|
|
@ -23,6 +23,9 @@ from PyQt4.QtCore import (
|
||||||
slot,
|
slot,
|
||||||
QThread,
|
QThread,
|
||||||
)
|
)
|
||||||
|
from PyQt4.QtGui import (
|
||||||
|
qApp
|
||||||
|
)
|
||||||
|
|
||||||
from ..image import Image
|
from ..image import Image
|
||||||
from ..page import Page, Glyph, Space
|
from ..page import Page, Glyph, Space
|
||||||
|
|
@ -68,6 +71,7 @@ class OCREngine(QThread):
|
||||||
yield self.recognize_glyph(glyph)
|
yield self.recognize_glyph(glyph)
|
||||||
|
|
||||||
def recognize_glyph(self, glyph):
|
def recognize_glyph(self, glyph):
|
||||||
|
qApp.processEvents()
|
||||||
if isinstance(glyph, Space):
|
if isinstance(glyph, Space):
|
||||||
return ' '
|
return ' '
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue