From b1c59e0c03d3cfd025e686a1007ea08b22b818f6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 28 Oct 2013 21:41:55 +0530 Subject: [PATCH] Set busy cursor on long job --- src/calibre/gui2/tweak_book/job.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/job.py b/src/calibre/gui2/tweak_book/job.py index 4dd2a6946d..5c5b277725 100644 --- a/src/calibre/gui2/tweak_book/job.py +++ b/src/calibre/gui2/tweak_book/job.py @@ -10,7 +10,7 @@ import time from threading import Thread from functools import partial -from PyQt4.Qt import (QWidget, QVBoxLayout, QLabel, Qt, QPainter, QBrush, QRect) +from PyQt4.Qt import (QWidget, QVBoxLayout, QLabel, Qt, QPainter, QBrush, QRect, QApplication, QCursor) from calibre.gui2 import Dispatcher from calibre.gui2.progress_indicator import ProgressIndicator @@ -65,8 +65,10 @@ class BlockingJob(QWidget): self.raise_() self.setFocus(Qt.OtherFocusReason) self.pi.startAnimation() + QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) def stop(self): + QApplication.restoreOverrideCursor() self.pi.stopAnimation() self.setVisible(False) self.parent().setEnabled(True)