File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 11from PythonQt .example import *
22
3- print "CustomObject wrapped by decorators"
3+ print ( "CustomObject wrapped by decorators" )
44
55# create a new object
66custom = CustomObject ("John" ,"Doe" )
77
88# print the object (to see how it is wrapped)
9- print custom
9+ print ( custom )
1010
1111# print the methods available
12- print dir (custom )
12+ print ( dir (custom ) )
1313
1414# set a name
1515custom .setFirstName ("Mike" )
1616custom .setLastName ("Michels" )
1717
1818# get the name
19- print custom .firstName () + " " + custom .lastName ();
19+ print ( custom .firstName () + " " + custom .lastName ())
Original file line number Diff line number Diff line change 44custom = CustomObject ("John" ,"Doe" )
55
66# print the methods available
7- print dir (custom )
7+ print ( dir (custom ) )
88
99# set a name
1010custom .setFirstName ("Mike" )
1111custom .setLastName ("Michels" )
1212
1313# get the name
14- print custom .firstName () + " " + custom .lastName ();
14+ print ( custom .firstName () + " " + custom .lastName ())
Original file line number Diff line number Diff line change 11from PythonQt import QtCore , QtGui , example
22
33# call our new constructor of QSize
4- size = QtCore .QSize (QtCore .QPoint (1 ,2 ));
4+ size = QtCore .QSize (QtCore .QPoint (1 ,2 ))
55
66# call our new QPushButton constructor
7- button = QtGui .QPushButton ("sometext" );
7+ button = QtGui .QPushButton ("sometext" )
88
99# call the move slot (overload1)
1010button .move (QtCore .QPoint (0 ,0 ))
1313button .move (0 ,0 )
1414
1515# call the static method
16- print QtGui .QWidget .mouseGrabber ();
16+ print ( QtGui .QWidget .mouseGrabber ())
1717
1818# create a CPP object via constructor
1919yourCpp = example .YourCPPObject (2 ,11.5 )
2020
2121# call the wrapped method on CPP object
22- print yourCpp .doSomething (3 );
22+ print ( yourCpp .doSomething (3 ))
2323
24- # show Q_SLOTS available on yourCpp
25- print dir (yourCpp )
24+ # show slots available on yourCpp
25+ print ( dir (yourCpp ) )
2626
2727# destructor will be called:
2828yourCpp = None
You can’t perform that action at this time.
0 commit comments