| 15 | # Subclassing QObject and using moveToThread |
| 16 | # http://labs.qt.nokia.com/2007/07/05/qthreads-no-longer-abstract/ |
| 17 | class SomeObject(QtCore.QObject): |
| 18 | |
| 19 | try: |
| 20 | finished = QtCore.Signal() # @UndefinedVariable |
| 21 | except: |
| 22 | finished = QtCore.pyqtSignal() # @UndefinedVariable |
| 23 | |
| 24 | def long_running(self): |
| 25 | count = 0 |
| 26 | while count < 5: |
| 27 | print("Increasing") # break here |
| 28 | count += 1 |
| 29 | self.finished.emit() |
| 30 | |
| 31 | app = QtCore.QCoreApplication([]) |
| 32 | objThread = QtCore.QThread() |
no outgoing calls
no test coverage detected