diff options
Diffstat (limited to 'examples3/widgets.py')
-rwxr-xr-x | examples3/widgets.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples3/widgets.py b/examples3/widgets.py index 0d3ce3a..fe36049 100755 --- a/examples3/widgets.py +++ b/examples3/widgets.py @@ -18,7 +18,7 @@ def TQMIN( x, y ): class AnalogClock( TQWidget ): def __init__( self, *args ): - apply( TQWidget.__init__, (self,) + args ) + TQWidget.__init__(*(self,) + args) self.time = TQTime.currentTime() # get current time internalTimer = TQTimer( self ) # create internal timer self.connect( internalTimer, SIGNAL("timeout()"), self.timeout ) @@ -74,7 +74,7 @@ class AnalogClock( TQWidget ): class DigitalClock( TQLCDNumber ): def __init__( self, *args ): - apply( TQLCDNumber.__init__,(self,) + args ) + TQLCDNumber.__init__(*(self,) + args) self.showingColon = 0 self.setFrameStyle(TQFrame.Panel | TQFrame.Raised) self.setLineWidth( 2 ) @@ -112,7 +112,7 @@ class DigitalClock( TQLCDNumber ): s[2] = ' ' if s[0] == '0': s[0] = ' ' - s = string.join(s,'') + s = ''.join(s) self.display( s ) def TQMIN( x, y ): @@ -130,7 +130,7 @@ MOVIEFILENAME = "trolltech.gif" class WidgetView ( TQWidget ): def __init__( self, *args ): - apply( TQWidget.__init__, (self,) + args ) + TQWidget.__init__(*(self,) + args) # Set the window caption/title self.setCaption( "TQt Widgets Demo Application" ) @@ -223,7 +223,7 @@ class WidgetView ( TQWidget ): self.vbox.addSpacing( self.bg.fontMetrics().height() ) - self.cb = range(3) + self.cb = list(range(3)) self.cb[0] = TQCheckBox( self.bg ) self.cb[0].setText( "Read" ) self.vbox.addWidget( self.cb[0] ) @@ -464,10 +464,10 @@ class WidgetView ( TQWidget ): TQApplication.setPalette( p, TRUE ) def lineEditTextChanged( self, newText ): - self.msg.setText("Line edit text: " + unicode(newText)) + self.msg.setText("Line edit text: " + str(newText)) def spinBoxValueChanged( self, valueText ): - self.msg.setText("Spin box value: " + unicode(valueText)) + self.msg.setText("Spin box value: " + str(valueText)) # All application events are passed throught this event filter. # We're using it to display some information about a clicked |