summaryrefslogtreecommitdiffstats
path: root/examples3/checklists.py
diff options
context:
space:
mode:
authoraneejit1 <aneejit1@gmail.com>2022-04-19 13:21:52 +0000
committerSlávek Banko <slavek.banko@axis.cz>2022-07-27 18:08:53 +0200
commit6be046642290c28c17949022fb66ae02ac21d544 (patch)
treee7b38b35a42b27569b26736afc4e472a2a5d672d /examples3/checklists.py
parent63fe0b82b47e7ee31f91374d96022a3ae77a86c3 (diff)
downloadpytqt-6be046642290c28c17949022fb66ae02ac21d544.tar.gz
pytqt-6be046642290c28c17949022fb66ae02ac21d544.zip
Updates to support Python version 3
Amendments to the sip source and configuration/build scripts to allow for support under Python version 3. The examples have been updated using "2to3" along with some manual changes to sort out intentation and casting to integer from float. Signed-off-by: aneejit1 <aneejit1@gmail.com> Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'examples3/checklists.py')
-rwxr-xr-xexamples3/checklists.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/examples3/checklists.py b/examples3/checklists.py
index 44bc09f..61734ba 100755
--- a/examples3/checklists.py
+++ b/examples3/checklists.py
@@ -9,27 +9,27 @@ TRUE = 1
FALSE = 0
class CheckLists(TQWidget):
- def __init__(self, *args):
- apply( TQWidget.__init__, (self, ) + args )
+ def __init__(self, *args):
+ TQWidget.__init__(* (self, ) + args )
- lay = TQHBoxLayout(self)
- lay.setMargin(5)
+ lay = TQHBoxLayout(self)
+ lay.setMargin(5)
- vbox1 = TQVBoxLayout(lay)
- vbox1.setMargin(5)
+ vbox1 = TQVBoxLayout(lay)
+ vbox1.setMargin(5)
- # First child: a Label
- vbox1.addWidget(TQLabel("Check some items!", self))
+ # First child: a Label
+ vbox1.addWidget(TQLabel("Check some items!", self))
- # Second child: the ListView
- self.lv1 = TQListView(self)
- vbox1.addWidget(self.lv1)
- self.lv1.addColumn("Items")
- self.lv1.setRootIsDecorated(TRUE)
+ # Second child: the ListView
+ self.lv1 = TQListView(self)
+ vbox1.addWidget(self.lv1)
+ self.lv1.addColumn("Items")
+ self.lv1.setRootIsDecorated(TRUE)
- # create a list with 4 ListViewItems which will be parent items of other ListViewItems
+ # create a list with 4 ListViewItems which will be parent items of other ListViewItems
- parentList = []
+ parentList = []
parentList.append( TQListViewItem( self.lv1, "Parent Item 1" ) )
parentList.append( TQListViewItem( self.lv1, "Parent Item 2" ) )
@@ -91,7 +91,7 @@ class CheckLists(TQWidget):
self.label = TQLabel( "No Item yet...", self )
tmp3.addWidget( self.label )
- def copy1to2(self):
+ def copy1to2(self):
self.lv2.clear()
# Insert first a controller Item into the second ListView. Always if Radio-ListViewItems