[PyKDE] QMessageBox.question bug?
John Ridley
ojokimu at yahoo.co.uk
Thu May 19 18:26:05 BST 2005
--- Martin Wiechert wrote:
> Thanks for your reply. Well, as I said I, had the same behaviour, as
> reported
> by you and the docs, before I updated my system, but now it changed:
>
>
> IPython 0.6.11 -- An enhanced Interactive Python.
> ? -> Introduction to IPython's features.
> %magic -> Information about IPython's 'magic' % functions.
> help -> Python's own help system.
> object? -> Details about 'object'. ?object also works, ?? prints
> more.
>
> IPython profile: scipy
>
> In [1]: from qt import *
>
> In [2]: import iqt
>
> In [3]: x = QMessageBox.question (None, 'Caption', 'Text',
> QMessageBox.Yes,
> ...: QMessageBox.No, QMessageBox.Cancel)
>
> In [4]: x # "Yes" clicked
> Out[4]: 0
>
> In [5]: x = QMessageBox.question (None, 'Caption', 'Text',
> QMessageBox.Yes,
> ...: QMessageBox.No, QMessageBox.Cancel)
>
> In [6]: x # "No" clicked
> Out[6]: 1
>
> In [7]: x = QMessageBox.question (None, 'Caption', 'Text',
> QMessageBox.Yes,
> ...: QMessageBox.No, QMessageBox.Cancel)
>
> In [8]: x # window closed without clicking a button
> Out[8]: 2
>
> In [9]: QMessageBox.Yes, QMessageBox.No, QMessageBox.Cancel
> Out[9]: (3, 4, 2)
>
>
> I'm lost.
Hello Martin
I'm not familiar with IPython. What does "import iqt" do?
And what happens if you run the code in an ordinary python session,
like this:
[bash_prompt]$ python2.4
Python 2.4.1 (#1, Mar 31 2005, 21:33:58)
[GCC 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)] on linux2
>>> from qt import *
>>> a = QApplication([])
>>> # click yes
... QMessageBox.question(None,'Caption','Text',3,4,2)
3
>>>
John Ridley
___________________________________________________________
Yahoo! Messenger - want a free and easy way to contact your friends online? http://uk.messenger.yahoo.com
More information about the PyQt
mailing list