##// END OF EJS Templates
merged in features from the MeVisLab repository...
merged in features from the MeVisLab repository - added createModuleFromFile/createModuleFromScript/createUniqueModule - switched object destruction to use QPointer and lazy wrapper removal to avoid expensive objectDestroyed signal connections - added hash() support for PythnQtWrapper object - added support for signal to python function connections where the function has less arguments than the emitted signal - added setQObject[NoLonger]WrappedCallback API to support external reference counting on QObjects that are exposed to PythonQt - implemented flush on std redirect to support python logging framework - improved QVariant printing and fixed print error on MacX git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@39 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r0:2978a919fc4e
r4:41816e302524
Show More
GettingStarted.py
26 lines | 722 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()