[PyKDE] Core dump and QString

Pete Ware ware at cis.ohio-state.edu
Mon Apr 17 21:04:48 BST 2000


Oops, here's some code that demonstrates it although I imagine it is a
pretty general problem.  Change the sense of the if test to get it to
work.

--pete

#! /usr/bin/env python
import qt
import sys
 
app = qt.QApplication (sys.argv)
main = qt.QMainWindow ()
 
text = qt.QTextBrowser (main)
text.setText ('testing')

main.setCentralWidget (text)
app.setMainWidget (main)
 
main.show ()
if 1:
	qt.QMessageBox.warning (main, 'Testing', 'A message',
				"OK", "Cancel",
				None, 0, 1)
else:
	qt.QMessageBox.warning (main, 'Testing', 'A message',
				"OK", "Cancel",
				'', 0, 1)
app.exec_loop ()




More information about the PyQt mailing list