[PyKDE] PyQt application freezing on long operations

Hans-Peter Jansen hpj at urpla.net
Mon Jan 22 20:13:12 GMT 2007


Am Montag, 22. Januar 2007 13:45 schrieb Carlos Eduardo:
> I created a SQL front end for multiple databases in PyQt, currently it
> supports sqlite and Oracle.
>
> I have a MDI window that i execute the SQL statements and populate a
> table in it.
>
> The problem is that when i run a query that takes too much time to
> evaluate or returns too much rows, my application freezes until the rows
> are populated into the table.
>
> Is there anything I can do to make the application responsive while the
> operation is in progress? I know that the problem is design related.. and
> not a bug but I have not found any solution for this.

You're way to sparse with description of your environment/approaches to give 
you helpful answers. 

One nice thing of Qt3 QDataTables is, you don't need to care about the 
number of rows, at least as long as the database[server] is fast enough to 
deliver the first bunch of records (500?). Qt manages the "fetch when used" 
quite effective behind the scenes. I'm using it on tables with 60000 
records without noticable delays - as long as I don't try to iterate 
through the result set myself. 

KR,
  Pete




More information about the PyQt mailing list