From f48a5ef67892ceecd39ee210a7b0226fd2ff6e8f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 25 Aug 2016 21:36:05 +0530 Subject: [PATCH] ... --- src/calibre/gui2/progress_indicator/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/calibre/gui2/progress_indicator/__init__.py b/src/calibre/gui2/progress_indicator/__init__.py index 51c65d8995..34717708a0 100644 --- a/src/calibre/gui2/progress_indicator/__init__.py +++ b/src/calibre/gui2/progress_indicator/__init__.py @@ -8,7 +8,7 @@ from __future__ import (unicode_literals, division, absolute_import, import math from PyQt5.Qt import ( Qt, QWidget, QSizePolicy, QSize, QRect, QConicalGradient, QPen, QBrush, - QPainter, QTimer, QVBoxLayout, QLabel, QStackedWidget + QPainter, QTimer, QVBoxLayout, QLabel, QStackedWidget, QDialog ) def draw_snake_spinner(painter, rect, angle, light, dark): @@ -154,8 +154,12 @@ class WaitStack(QStackedWidget): if __name__ == '__main__': from calibre.gui2 import Application app = Application([]) - w = ProgressSpinner() - w.show() + d = QDialog() + d.resize(100, 100) + w = ProgressSpinner(d) + l = QVBoxLayout(d) + l.addWidget(w) w.start() - app.exec_() + d.exec_() + del d del app