Exemplo n.º 1
0
def waitCursor():
    """Context manager creating an hour glass style cursor for longer-running
    blocking tasks inside GUI code.  Example::

        with waitCursor():
            # process takes some time
            pass
    """
    try:
        QApplication.setOverrideCursor(Qt.WaitCursor)
        yield
    finally:
        QApplication.restoreOverrideCursor()
Exemplo n.º 2
0
def wait_cursor():
    try:
        QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
        yield
    finally:
        QApplication.restoreOverrideCursor()