Turecko-americká vycházející matematická hvězda Levent Alpöge ze společnosti Anthropic vyvolal pozdvižení oznámením (PDF), že s pomocí superinteligence Claude od Antropicu dokázal vyřešit jeden ze sedmi největších matematických problémů tisíciletí, slavnou Riemannovu hypotézu (prvočísla se mezi čísly objevují zdánlivě nepravidelně, hypotéza tvrdí, že za jejich rozmístěním je určitý řád). Svůj důkaz uvolnil jako open-source
… více »
class configui( QtGui.QDialog ):
...
self.oform=uic.loadUi('UI/config.ui')
...
x = animator( self.oform.label_set_up_pw, 5)
x.timer.start( 500 )
class animator( QObject ):
def __init__( self, widget, times ) :
super( animator, self ).__init__()
self.widget = widget
self.count = 0
self.max_count = times
self.w_status = True
self.timer = QTimer()
self.timer.timeout.connect( self.timerevent )
print "spouštím timer"
def timerevent(self ):
self.w_status = not( self.w_status )
print self.w_status
self.widget.setVisible( self.status )
self.count += 1
if ( self.count >= self.max_count ) :
self.widget.setVisible( True )
self.timer.stop()
Spouštím timer
se vypíše, ale dál to nic nedělá. Může mně ěkdo popostrčit, co mám špatně ?
Předem díky
Milan
Řešení dotazu:
self.widget.setVisible( self.status ) a přitom proměnnou máš self.w_status
x = animator( self.oform.label_set_up_pw, 5) x.timer.start( 500 ) na self.x = animator( self.oform.label_set_up_pw, 5) self.x.timer.start( 500 )už to jede, jak má Milan
Tiskni
Sdílej: