[PyQt] QSqlDatabase connection parameters

2010-03-16 Thread Scott Frankel
Hi all, Is there a buffer size or similar optimization parameter that can be set for QSqlDatabase PSQL connections? The docs refer to PostgreSQL "options" without specifying what they may be. I have a PG database cluster of about 7MB, spread over a couple dozen tables. Locally, it take

[PyQt] how does sip detect when an object has been deleted by C++

2010-03-16 Thread Nathan Cournia
Hi, I've just started using SIP and have run into some questions. First, given the following pseudo sip code: struct Foo { %TypeHeaderCode #include %End void bar(); }; // basically does "return new Foo;" Foo* createFoo() // basically does "delete foo;" deleteFoo(Foo* foo /Transfer/); No

Re: [PyQt] Show selected rows

2010-03-16 Thread Scott Frankel
Hi Mads, You might take a look at QTableView.setRowHidden(). I'm testing something along similar lines. (See my displayTableRows() method in the attached file.) While my working code gets its displayable rows from a second SQL query, in your case, it wouldn't take much to glean the info

[PyQt] crash in sip.cast

2010-03-16 Thread Nathan Cournia
Hi, The following script segfaults: import sys import sip from PyQt4.QtGui import * a = QApplication(sys.argv) # create a menu b = QMenu() # cast it to a widget c = sip.cast(b, QWidget) # cast the widget, which is really a menu, back to a menu. # this line crashes d = sip.cast(c, QMenu) Here

[PyQt] Show selected rows

2010-03-16 Thread Mads Ipsen
Dear Gurus, Suppose I have a table model that I view in a QTableView (A). In another QTableView (B) I want to display the rows that are selected in the first QTableView (A). How do I achieve this? Ie, each selected row in view (A) should be displayed in view (B). Best regards, Mads -- +-