(self, dt=1.)
Initialize the timer.
        
        This method *must* be called in the `initialize` method of the widget.
        
        Arguments:
          * dt=1.: the timer interval in seconds.
Initialize the timer.
        
        This method *must* be called in the `initialize` method of the widget.
        
        Arguments:
          * dt=1.: the timer interval in seconds.
Initialize the timer . This method * must * be called in the initialize method of the widget . Arguments : * dt = 1 . : the timer interval in seconds .
def initialize_timer(self, dt=1.):
        """Initialize the timer.
        
        This method *must* be called in the `initialize` method of the widget.
        
        Arguments:
          * dt=1.: the timer interval in seconds.
          
        """
        self.t = 0.
        self.dt = dt
        # start simulation after initialization completes
        self.timer = QtCore.QTimer()
        self.timer.setInterval(dt * 1000)
        self.timer.timeout.connect(self.update_callback)
        self.paint_manager.t = self.t
def initialize_timer ( self , dt = 1. ) : self . t = 0. self . dt = dt # start simulation after initialization completes self . timer = QtCore . QTimer ( ) self . timer . setInterval ( dt * 1000 ) self . timer . timeout . connect ( self . update_callback ) self . paint_manager . t = self . t