[PyKDE] Python-qt on Debian, more error messages

Gudjon I. Gudjonsson gudjon at mc2.chalmers.se
Thu Jul 6 09:51:53 BST 2006


Hi again (and for the last time on this subject)
    Now the problem is fixed and I have to admit that my previous diagnosis 
was wrong. The problem was that I did use two threads in my programs, one for 
upgrading the graphs and the other for doing the measurements. Now I use one 
thread for the measurement and a timer to upgrade the graphs.
   I did switch from python thread to qthread for the measurement routine 
since the qthreads can be restarted (or I don't know how to restart a python 
thread). I can define the measurement thread and start the measurement over 
and over again in the qthread but not in the python thread. 
   The program has run now for 50 measurements without a single crash and I am 
very happy:) Now I will start a mass production of measurement programs for 
all the instruments in the laboratory.

Many thanks for your help
Gudjon

> >    I have to admit my stupidity. I made the python-qwt Debian packages
> > myself and I did the failure of compiling them on a computer with the
> > nvidia packages installed. I recompiled them on a computer without nvidia
> > and now the application works much better.
>
> So part of the problem are bugs in the nvidia drivers?
No, I unfortunately gave a false description (because the crashes came 
irregularly).
>
> Install the qt-examples package and have a look at them. There are some
> example that show you how to use threads, IIRC the mandelbrot example
> show multithreaded GUI with a worker thread in the background and the
> GUI thread.
I did not find these examples but the example program semaphore.py appeared to 
be very helpful.
>
> One important thing to always remember that in Qt it is not possible to
> do any GUI actions in the non-GUI thread and you also cannot connect
> signals/slots between different threads. You always have to use events.
>
> Andreas




More information about the PyQt mailing list