[PyQt] Re: Re: Populate Model data in a separate thread (Detlev Offenbach)

2009-04-27 Thread Edwin Marshall
This is what I did initially (via fetchMore and canFetchMore), but this technique rinders sorting/filtering useless, as only the viewable content will be searchable. Regards, Edwin Marshall > -Original Message- > From: pyqt-requ...@riverbankcomputing.com > Sent: Mon, 27 Apr 2009 23:22:1

Re: Re: [PyQt] Populate Model data in a separate thread (Demetrius Cassidy)

2009-04-27 Thread Demetrius Cassidy
I suggest you read over http://doc.trolltech.com/4.5/qthread.html, and while the examples are in C++ don't look too much into the syntax differences but rather what it's doing. Although I haven't used QThread before, I have used python's threading classes. My understanding is that you create a QT

Re: [PyQt] Searching for a very small scprit using CLIPBOARD

2009-04-27 Thread Aron Bierbaum
I have not tested on Linux, but it would not surprise me if it was not supported in the same way. -Aron On Mon, Apr 27, 2009 at 5:22 PM, Giovanni Bajo wrote: > On lun, 2009-04-27 at 18:42 +0200, projetmbc wrote: >> Thanks a lot, your solution works fine.  :-)  Here is the complete >> minimal cod

Re: [PyQt] Searching for a very small scprit using CLIPBOARD

2009-04-27 Thread Roberto Alsina
On Monday 27 April 2009 19:22:04 Giovanni Bajo wrote: > On lun, 2009-04-27 at 18:42 +0200, projetmbc wrote: > > Thanks a lot, your solution works fine. :-) Here is the complete > > minimal code : > > > > > > #!/usr/bin/env python > > #coding=utf-8 > > import s

Re: [PyQt] Searching for a very small scprit using CLIPBOARD

2009-04-27 Thread Giovanni Bajo
On lun, 2009-04-27 at 18:42 +0200, projetmbc wrote: > Thanks a lot, your solution works fine. :-) Here is the complete > minimal code : > > > #!/usr/bin/env python > #coding=utf-8 > import sys > from PyQt4 import QtGui, QtCore > app = QtGui.QApplication(sys.

[PyQt] How do I stretch layouts in a QSplitter using Designer?

2009-04-27 Thread Edwin Marshall
My original ui file contained two widgets inside a vertical QSplitter. The top widget had a vertical stretch of 1, and the bottom one had a vertical stretch of 4. As such, if the user resizes, the top widget will always be 1/4 the size of the bottom one. I have decided to change my ui file slig

[PyQt] Re: Re: Populate Model data in a separate thread (Demetrius Cassidy)

2009-04-27 Thread Edwin Marshall
First of all, I am subscribed to the digest version of the mailing list, so I'm not 100% sure how to reply to specific topics, sorry. Demetrius, my model currently contains approx. 1,800 records, and will eventually contain about 4,400 records, each with 11 columns, one of which displays a pixm

Re: [PyQt] QtSvg.QSvgRenderer.boundsOnElement issue

2009-04-27 Thread Aron Bierbaum
Thanks for the quick turn around. -Aron On Mon, Apr 27, 2009 at 2:37 PM, Phil Thompson wrote: > On Mon, 27 Apr 2009 11:38:40 -0500, Aron Bierbaum > wrote: >> I have recently downloaded and testing with the latest PyQt 4.5 >> snapshot, 20090426, and I am having a few problems. If I run the >> at

Re: [PyQt] QtSvg.QSvgRenderer.boundsOnElement issue

2009-04-27 Thread Phil Thompson
On Mon, 27 Apr 2009 11:38:40 -0500, Aron Bierbaum wrote: > I have recently downloaded and testing with the latest PyQt 4.5 > snapshot, 20090426, and I am having a few problems. If I run the > attached test program with PyQt 4.4.4 and Qt 4.5.0 I get the correct > output: > > Square 1 bounds: PyQt4

Re: [PyQt] Populate Model data in a separate thread

2009-04-27 Thread Detlev Offenbach
Another solution would be to do lazy population of the model. That is, if child items are to be shown, fetch them at that time. This avoids populating the model in advance and is more responsive. See eric4 as an example. Detlev On Montag, 27. April 2009, Demetrius Cassidy wrote: > How many item

Re: [PyQt] Searching for a very small scprit using CLIPBOARD

2009-04-27 Thread projetmbc
Thanks a lot, your solution works fine. :-) Here is the complete minimal code : #!/usr/bin/env python #coding=utf-8 import sys from PyQt4 import QtGui, QtCore app = QtGui.QApplication(sys.argv) clipboard = app.clipboard() clipboard.setText('The text that mu

[PyQt] QtSvg.QSvgRenderer.boundsOnElement issue

2009-04-27 Thread Aron Bierbaum
I have recently downloaded and testing with the latest PyQt 4.5 snapshot, 20090426, and I am having a few problems. If I run the attached test program with PyQt 4.4.4 and Qt 4.5.0 I get the correct output: Square 1 bounds: PyQt4.QtCore.QRectF(10.0072001, 942.3621767198, 100.0056, 1

Re: [PyQt] RuntimeError: underlying C/C++ object has been deleted

2009-04-27 Thread Alexandr N Zamaraev
Alexandr N Zamaraev wrote: I reproduce this with sip-4.8-snapshot-20090424 (self build) PyQt-win-gpl-4.5-snapshot-20090328 (self build) Call Garbage Collector after the closing of the dialogue does not produce any effect. Sorry. I found. This is my reference cycle.

Re: [PyQt] Populate Model data in a separate thread

2009-04-27 Thread Demetrius Cassidy
How many items do you need to populate in your model class? Unless you are populating a view with thousands of items, I do not suggest threads at all since they can be dangerous if you do not know how to use them. If you absolutely needed to do this, my approach would be to have some sort of met

Re: [PyQt] RuntimeError: underlying C/C++ object has been deleted

2009-04-27 Thread Demetrius Cassidy
You cannot instantiate a base class wrapped through sip with super. You need to directly call the base class contructor via the __init__ method. I quote "The way that super is currently implemented means that the lazy lookup is bypassed resulting in AttributeError exceptions unless the attribute