[PyQt] QListWidget and scrolling

cgavin at photopano.net cgavin at photopano.net
Thu Sep 30 05:37:24 BST 2010


Alright, sorry for the spam, I found it :-)

I was using asynchronous signals. The worker thread blasts the UI thread
with signals and the event queue becomes full after a while, which
crashes the app.

I converted the signal to communicate between the worker thread and the
main thread to the new PyQt style signal with the
Qt.BlockingQueuedConnection option and everything is fine.

Christian

-------- Original Message --------
Subject: QListWidget and scrolling
From: <cgavin at photopano.net>
Date: Tue, September 28, 2010 5:08 pm
To: pyqt at riverbankcomputing.com

Hi,

I created an application that contains a worker thread (derived from
QThread) sending a signal to the main UI thread which displays status
messages in a QListWidget.

Adding strings to the QListWidget works fine, however the list doesn't
scroll to the end. I'd like the list to scroll to the bottom every time
a new string is added.

I tried scrollToBottom() and it froze the application. Another thing I
tried is retrieve the last item and call scrollToItem(), with the same
result.

I am running PyQt 4.7 and Python 2.5 on Vista 64.

What am I doing wrong :-( ?

Thanks,
Christian



More information about the PyQt mailing list