##// 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@192 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r153:c16b43410891
r153:c16b43410891
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