##// END OF EJS Templates
Now Works with Python 2 & 3, Qt 4 & 5....
Now Works with Python 2 & 3, Qt 4 & 5. CMake now generates different librariy files depending on the linked Qt/Python versions: PythonQt - Qt 4.x + Python 2.x PythonQt_3 - Qt 4.x + Python 3.x PythonQt5 - Qt 5.x + Python 2.x PythonQt5_3 - Qt 5.x + Python 3.x Fix Qt 4 build.

File last commit:

r6:569bd3d658ae
r208:1476f2d2cf46
Show More
GettingStarted.py
27 lines | 723 B | text/x-python | PythonLexer
from PythonQt import *
# set the title of the group box, accessing the title property
box.title = 'PythonQt Example'
# set the html content of the QTextBrowser
box.browser.html = 'Hello <b>Qt</b>!'
# set the title of the button
box.button1.text = 'Append Text'
# set the text of the line edit
box.edit.text = '42'
# define our own python method that appends the text from the line edit
# to the text browser
def appendLine():
box.browser.append(box.edit.text)
# connect the button's clicked signal to our python method
box.button1.connect('clicked()', appendLine)
# connect the lineedit's returnPressed signal to our python method
box.edit.connect('returnPressed()', appendLine)
# show the window
box.show()