[PyQt] with PyQt's input hook, is it expected that sending to stdin dismisses a modal dialog created in response to a signal?
ice.rikh at gmail.com
Tue Feb 23 15:17:12 GMT 2016
With PyQt's input hook, is it expected that sending \n to stdin dismisses a
modal dialog created in response to a signal? Looking at
qtcore_input_hook() in qcoreapplication.sip, it's easy to see why this
happens, and it seems like a reasonable compromise between permitting modal
dialogs and avoiding blocking the Python prompt. Still, google doesn't
reveal a definitive answer, and I'd like to be sure that I understand the
On OS X:
Python 3.5.1 (default, Dec 14 2015, 16:26:43)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5 import Qt
>>> import sys
>>> app = Qt.QApplication(sys.argv)
>>> def show_file_dlg():
... Qt.QFileDialog.getSaveFileName(None, 'test',filter='tests (*.test
>>> t = Qt.QTimer()
>>> t.start(1000) # wait a second, file dialog appears
>>> # press enter in terminal, file dialog is dismissed and we get a new
The behavior on Linux is the same.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt