[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QMessageBox does not get focus
From:       Mads Ipsen <mpi () comxnet ! dk>
Date:       2009-09-27 15:46:16
Message-ID: 4ABF88C8.4090400 () comxnet ! dk
[Download RAW message or body]

Mads Ipsen wrote:
> When I launch a QMessageBox like below, from a QMainWindow the box 
> does not have keyboard focus (its not the active window), implying 
> that the key-shortcuts cannot be used. Any fixes or suggestions?
>
> Mads
>
> QtGui.QMessageBox.warning(self, 'Some title',
>                                self.tr("The document has been 
> modified.\n"
>                                        "Do you want to save your 
> changes?"),
>                                QtGui.QMessageBox.Yes | 
> QtGui.QMessageBox.Default,
>                                QtGui.QMessageBox.No,
>                                QtGui.QMessageBox.Cancel | 
> QtGui.QMessageBox.Escape)
>
Let me rephrase this:

* Run application.py in examples/mainwindows/application
* Type something in the editor window.
* Close the application by pressing the 'cross' in the upper-right 
corner of the application window.
* A QMessageBox appears. It does not have keyboard focus.

If you exit by pressing Ctrl+Q, however, the QMessageBox will have 
keyboard focus.

Mads


-- 
+------------------------------------------------------------+
| Mads Ipsen, Scientific developer                           |
+------------------------------+-----------------------------+
| QuantumWise A/S              | phone:         +45-29716388 |
| Nørresøgade 27A              | www:    www.quantumwise.com |
| DK-1370 Copenhagen, Denmark  | email:  mpi@quantumwise.com |
+------------------------------+-----------------------------+


_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic