[PyKDE] Problem using PyQT and Outlook Object Model
John
jjshome at ntlworld.com
Tue Nov 19 20:59:01 GMT 2002
Hello
The following code in a PyQt program, called on a QToolbarBotton 'Clicked'
signal causes the python interpreter to crash when the emsg.Display() line is
reached.
############################################
import win32com.client
def onEmail(self):
app = win32com.client.Dispatch("Outlook.Application")
emsg = app.CreateItem(win32com.client.constants.olMailItem)
emsg.Subject = "Hello"
emsg.Display() # CRASH
############################################
The same code works fine if called at startup before:
app=QApplication(args)
My system is:
Win2000 SP2
Python 2.1.1c1
PyQt 2.1 (as supplied with BlackAdder 1.0 Beta3)
Can anyone help ?
More information about the PyQt
mailing list