Exemplo n.º 1
0
    def __init__(self, parent=None):
        super(AnalogClock, self).__init__(parent)

        timer = QTimer(self)
        timer.timeout.connect(self.update)
        timer.start(1000)
        #timer = QTimer(self)
        #timer.timeout.connect(lambda: self.raise_())
        #timer.start(100)
        print(timer.isSingleShot())

        # Make this window an overlay.
        self.setAttribute(Qt.WA_TranslucentBackground |
                          Qt.WA_MacAlwaysShowToolWindow
                          )
        self.setWindowFlags(Qt.FramelessWindowHint |
                            Qt.WindowStaysOnTopHint |
                            Qt.Dialog
        )
        #self.setFloating(True)
        # Make visible on all spaces.

        self.setWindowTitle("Analog Clock")
        self.resize(200, 200)