example.py
14 lines
| 282 B
| text/x-python
|
PythonLexer
florianlink
|
r10 | from PythonQt import CustomObject | ||
ezust
|
r0 | |||
# create a new object | ||||
custom = CustomObject("John","Doe") | ||||
# print the methods available | ||||
print dir(custom) | ||||
# set a name | ||||
custom.setFirstName("Mike") | ||||
custom.setLastName("Michels") | ||||
# get the name | ||||
print custom.firstName() + " " + custom.lastName(); | ||||