[PyQt] [Announce] EuroPython 2010 (17-24 July)

2010-03-19 Thread David Boddie
I thought this announcement might be relevant to some of the readers of this list. Apologies to those of you who have already seen it elsewhere. David EuroPython 2010 - 17th to 24th July 2010 EuroPython is a conference for the Python programming language

[PyQt] Connecting to base class signals in subclass

2010-03-19 Thread Demetrius Cassidy
I am not sure if this is the intended behavior, but if I subclass a QWidget instance, and then try to connect to one of those signals in my subclass, I get a TypeError: >>> class MyLabel(QtGui.QLabel): ... def __init__(self): ... self.linkActivated.connect(self._lnkActivated) ...

Re: [PyQt] QSqlDatabase connection parameters

2010-03-19 Thread Scott Frankel
On Mar 19, 2010, at 2:27 PM, Russell Valentine wrote: So if you did the exact same statements your program is doing with psql to the remote server, they take a similar time as the local? No, the statements to the remote server take 20x longer! 2.5 (remote) vs. 0.12 (local) seconds. You s

Re: [PyQt] QSqlDatabase connection parameters

2010-03-19 Thread Russell Valentine
So if you did the exact same statements your program is doing with psql to the remote server, they take a similar time as the local? You say similar dataset, just wondering if maybe the remote was missing a index or hasn't been vacuumed in a while. Can you do a vacuum yourself just to double check

Re: [PyQt] PyQt 4.7 / Qt 4.6.1 QSortFilterProxyModel subclass not emitting signals

2010-03-19 Thread Giacomo Lacava
On Fri, Mar 19, 2010 at 11:47 AM, Giacomo Lacava wrote: > It seems like subclasses of QSortFilterProxyModel will not emit > inherited signals. Tested with PyQt 4.7 / Qt 4.6.1 on Windows XP. Same happening on Linux with the same PyQt/Qt combination. Adding the pyqtSlot decorator doesn't make any

Re: [PyQt] Delete a Laytou

2010-03-19 Thread starglider develop
Hi Nick, I'm trying to make it work without luck, is there any python example? The example that is in *Rapid GUI Programming With Python and Qt* is only for stackedwidgets. Thank you. On 19 March 2010 10:38, Nick Gaens wrote: > Take a look at a QStackedLayout.. You can add multiple widgets, ea

Re: [PyQt] QSqlDatabase connection parameters

2010-03-19 Thread Scott Frankel
On Mar 19, 2010, at 12:59 PM, Matt Newell wrote: On Friday 19 March 2010 12:06:12 Scott Frankel wrote: Hi all, Would anyone have any suggestions for improving QSqlDatabase PSQL connection performance? The Qt docs refer to PSQL connection options and demonstrate the "requiressl=1" example.

Re: [PyQt] QSqlDatabase connection parameters

2010-03-19 Thread Scott Frankel
On Mar 19, 2010, at 12:24 PM, Russell Valentine wrote: Perhaps time each part to see what exactly is taking up the time? Thanks for the suggestion. I was hoping to find a global parameter (buffer_size, or similar) that could be tweaked to improve overall performance. My app loads a do

[PyQt] pyqt and dbus

2010-03-19 Thread Kobus Wolvaardt
Hi, I have found an oddity with dbus and pyqt. A message of type string longer than 120k sent over dbus will work, but the eventloop from where it was sent will go crazy with cpu usage at 100% after that. This does not happen with the glib eventloop and python, and it also doesn't happen with the

Re: [PyQt] QSqlDatabase connection parameters

2010-03-19 Thread Matt Newell
On Friday 19 March 2010 12:06:12 Scott Frankel wrote: > Hi all, > > Would anyone have any suggestions for improving QSqlDatabase PSQL > connection performance? > > > The Qt docs refer to PSQL connection options and demonstrate the > "requiressl=1" example. Are there other options that can be set?

Re: [PyQt] QSqlDatabase connection parameters

2010-03-19 Thread Russell Valentine
Perhaps time each part to see what exactly is taking up the time? One way to do so is below: t=time.time() dostuff() print "dostuff() time = "+str(time.time()-t)+" s" Is it really the initial connection that takes a long time to get, or is it something else on that remote machine. work_mem has no

Re: [PyQt] QSqlDatabase connection parameters

2010-03-19 Thread Scott Frankel
Hi all, Would anyone have any suggestions for improving QSqlDatabase PSQL connection performance? The Qt docs refer to PSQL connection options and demonstrate the "requiressl=1" example. Are there other options that can be set? (eg: the docs' PostgreSQL "options" bullet point) Googl

Re: [PyQt] problem connecting to QDialog exec_ method

2010-03-19 Thread Phil Thompson
On Fri, 19 Mar 2010 11:54:36 +, Stuart McNicholas wrote: > I have a very simple program: > > from PyQt4 import QtGui, QtCore > import sys > > class Win(QtGui.QWidget): >SaveFiles = QtCore.pyqtSignal() >def __init__(self,parent=None): > QtGui.QWidget.__init__(self,parent) >

[PyQt] problem connecting to QDialog exec_ method

2010-03-19 Thread Stuart McNicholas
I have a very simple program: from PyQt4 import QtGui, QtCore import sys class Win(QtGui.QWidget): SaveFiles = QtCore.pyqtSignal() def __init__(self,parent=None): QtGui.QWidget.__init__(self,parent) self.fileDialog = QtGui.QDialog() self.SaveFiles.connect(self.fileDialog.exec_)

[PyQt] PyQt 4.7 / Qt 4.6.1 QSortFilterProxyModel subclass not emitting signals

2010-03-19 Thread Giacomo Lacava
It seems like subclasses of QSortFilterProxyModel will not emit inherited signals. Tested with PyQt 4.7 / Qt 4.6.1 on Windows XP. I couldn't find any related entry in Qt bugtracker, so I guess it's PyQt's fault (unless I've done something wrong). Here's a simple testcase (expects a ui.py file with

Re: [PyQt] Again, problems with garbage collection

2010-03-19 Thread Martin Teichmann
Hi List, Hi Phil, >> I just upgraded to PyQt4 4.7.2 (with Python 2.6.4 on Windows XP) >> and the following little script crashes with "unterlying C/C++ object >> has been deleted" >> >> I guess that's a bug. > > Why? It works as I would expect. Oops. I didn't realize that that's a excpected behav

Re: [PyQt] Delete a Laytou

2010-03-19 Thread Nick Gaens
Take a look at a QStackedLayout.. You can add multiple widgets, each having their own layout, to it and set it as the central widget of your mainwindow. There's no need for deleting a layout and set a new one, since you alternate between the added widgets / layouts. Check out http://doc.trolltech.

[PyQt] Link failure when compiling with --debug on Mac

2010-03-19 Thread Stuart McNicholas
Dear All, I tried configuring with --debug on OS X 10.6 with sip 4.10.1/PyQt 4.7.2, Qt 4.6.2 (built from source) The linker tries to pull in -framework QtCore_debug. This does not exist. -lQtCore_debug could possibly work with libtool, I guess? g++ -headerpad_max_install_names -bundle -und