[PyQt] Fwd: threading and qt warnings
Phil Thompson
phil at riverbankcomputing.co.uk
Fri Sep 7 09:09:02 BST 2007
On Thursday 06 September 2007, Darren Dale wrote:
> Hello,
>
> I am writing some code to allow a pyqt4 program to be run with ipython in a
> separate thread. Using python-2.5.1, qt-4.3.1 and pyqt-4.3, I get the
> following warning messages at each timeout:
>
> QSocketNotifier: Can only be used with threads started with QThread
> QApplication::exec: Must be called from the main thread
>
> A short standalone script that reproduces this behavior is attached. If I
> comment out the raw_input statement on line 21, and uncomment lines 22 and
> 23, then I do not get the warnings.
>
> I reported the issue at Trolltech, and they suggested that I was somehow
> calling exec_ at every timeout, but I think I am only calling it once. They
> also suggested that I could silence the warnings, and pointed me to
> http://doc.trolltech.com/4.3/qtglobal.html#qWarning, but I was not able to
> silence the warnings by defining a python global QT_NO_WARNING_OUTPUT, or
> an environment variable QT_FATAL_WARNINGS. Is it possible to silence these
> warnings with PyQt4?
>
> If anyone was willing to have a look at the attached script and comment, I
> would really appreciate it.
>
> Thank you,
> Darren
Try current snapshots.
Phil
More information about the PyQt
mailing list