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 ()



Reply via email to