##// END OF EJS Templates
Modify typesystems to #ifdef PyString
Modify typesystems to #ifdef PyString

File last commit:

r153:c16b43410891
r210:d5ac67324004
Show More
example.py
28 lines | 631 B | text/x-python | PythonLexer
florianlink
fixed example for 2.0 API...
r153 from PythonQt import QtCore, QtGui, example
ezust
reorganized SVN tree into branches, tags and trunk...
r0
# call our new constructor of QSize
florianlink
fixed example for 2.0 API...
r153 size = QtCore.QSize(QtCore.QPoint(1,2));
ezust
reorganized SVN tree into branches, tags and trunk...
r0
# call our new QPushButton constructor
florianlink
fixed example for 2.0 API...
r153 button = QtGui.QPushButton("sometext");
ezust
reorganized SVN tree into branches, tags and trunk...
r0
# call the move slot (overload1)
florianlink
fixed example for 2.0 API...
r153 button.move(QtCore.QPoint(0,0))
ezust
reorganized SVN tree into branches, tags and trunk...
r0
# call the move slot (overload2)
button.move(0,0)
# call the static method
florianlink
fixed example for 2.0 API...
r153 print QtGui.QWidget.mouseGrabber();
ezust
reorganized SVN tree into branches, tags and trunk...
r0
# create a CPP object via constructor
florianlink
fixed example for 2.0 API...
r153 yourCpp = example.YourCPPObject(2,11.5)
ezust
reorganized SVN tree into branches, tags and trunk...
r0
# call the wrapped method on CPP object
print yourCpp.doSomething(3);
# show slots available on yourCpp
print dir(yourCpp)
# destructor will be called:
yourCpp = None