From 7213c0a60c7157ed9336f5f36b87f9b241d8d5fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Thu, 24 May 2018 01:37:28 +0300 Subject: Removed the Qt scheduler --- examples/schedulers/qt.py | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 examples/schedulers/qt.py (limited to 'examples') diff --git a/examples/schedulers/qt.py b/examples/schedulers/qt.py deleted file mode 100644 index c0ab5b5..0000000 --- a/examples/schedulers/qt.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -Demonstrates how to use the Qt compatible scheduler to schedule a job that executes on 3 second -intervals. -""" - -from datetime import datetime -import signal -import sys - -from apscheduler.schedulers.qt import QtScheduler - -try: - from PyQt5.QtWidgets import QApplication, QLabel -except ImportError: - try: - from PyQt4.QtGui import QApplication, QLabel - except ImportError: - from PySide.QtGui import QApplication, QLabel - - -def tick(): - label.setText('Tick! The time is: %s' % datetime.now()) - - -if __name__ == '__main__': - app = QApplication(sys.argv) - - # This enables processing of Ctrl+C keypresses - signal.signal(signal.SIGINT, lambda *args: QApplication.quit()) - - label = QLabel('The timer text will appear here in a moment!') - label.setWindowTitle('QtScheduler example') - label.setFixedSize(280, 50) - label.show() - - scheduler = QtScheduler() - scheduler.add_job(tick, 'interval', seconds=3) - scheduler.start() - - # Execution will block here until the user closes the windows or Ctrl+C is pressed. - app.exec_() -- cgit v1.2.1