File: example.py

package info (click to toggle)
pythonqt 2.1.0~svn247-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 21,852 kB
  • ctags: 60,757
  • sloc: cpp: 456,580; xml: 17,942; python: 64; sh: 19; makefile: 4
file content (28 lines) | stat: -rw-r--r-- 631 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from PythonQt import QtCore, QtGui, example

# call our new constructor of QSize
size = QtCore.QSize(QtCore.QPoint(1,2));

# call our new QPushButton constructor
button = QtGui.QPushButton("sometext");

# call the move slot (overload1)
button.move(QtCore.QPoint(0,0))

# call the move slot (overload2)
button.move(0,0)

# call the static method
print QtGui.QWidget.mouseGrabber();

# create a CPP object via constructor
yourCpp = example.YourCPPObject(2,11.5)

# 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