summaryrefslogtreecommitdiff
path: root/src/leap/gui/threads.py
blob: 176c19b16c9707df8f23fffba59f251994d6ee6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from PyQt4 import QtCore


class FunThread(QtCore.QThread):

    def __init__(self, fun, parent=None):
        QtCore.QThread.__init__(self, parent)
        self.fun = fun

    def run(self):
        if self.fun:
            self.fun()

    def begin(self):
        self.start()