##// END OF EJS Templates
fixed example for 2.0 API...
fixed example for 2.0 API git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@190 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r0:2978a919fc4e
r151:a5a8aa72950d
Show More
example.py
38 lines | 771 B | text/x-python | PythonLexer
ezust
reorganized SVN tree into branches, tags and trunk...
r0 from PythonQt import *
print "alternative 1 : CustomObject wrapped by decorators"
# create a new object
custom = CustomObject("John","Doe")
# print the object (to see how it is wrapped)
print custom
# print the methods available
print dir(custom)
# set a name
custom.setFirstName("Mike")
custom.setLastName("Michels")
# get the name
print custom.firstName() + " " + custom.lastName();
print
print "alternative 2 : CustomObject2 wrapped by factory"
# create a new object
custom2 = CustomObject2("John","Doe")
# print the object (to see how it is wrapped)
print custom2
# print the methods available
print dir(custom2)
# set a name
custom2.setFirstName("Mike")
custom2.setLastName("Michels")
# get the name
print custom2.firstName() + " " + custom2.lastName();