Re: [PyQt] Multiprocessing and ProgressBar

2010-10-07 Thread Sybren A . Stüvel
re is a way to make the Qt signals work over Python's multiprocessing interface. -- Sybren A. Stüvel http://stuvel.eu/ ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] API 2 and Qt Designer

2010-09-29 Thread Sybren A . Stüvel
se the reply-to header either. -- Sybren A. Stüvel http://stuvel.eu/ signature.asc Description: Digital signature ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] API 2 and Qt Designer

2010-09-28 Thread Sybren A. Stüvel
PI 2 against the mix of Python 2 and 3... -- Sybren A. Stüvel syb...@stuvel.eu http://stuvel.eu/ signature.asc Description: This is a digitally signed message part. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] API 2 and Qt Designer

2010-09-28 Thread Sybren A. Stüvel
plugin directory, I get those errors. PS: Please reply to just the list, there is no need to do reply-all, I'm on the list too. With a reply-all I get your mail twice. -- Sybren A. Stüvel syb...@stuvel.eu http://stuvel.eu/ signature.asc Description: This is a

Re: [PyQt] API 2 and Qt Designer

2010-09-28 Thread Sybren A. Stüvel
On Tuesday 28 September 2010 11:51:06 Sybren A. Stüvel wrote: > Is it possible to move to API 2 and still keep using Qt Designer? PS: I'm using Qt Designer on Kubuntu 10.04 from the qt4-designer package version 4:4.6.3-0ubuntu1. -- Sybren A. Stüvel syb...@stuvel.eu http://s

[PyQt] API 2 and Qt Designer

2010-09-28 Thread Sybren A. Stüvel
;, 2) my code seems to become incompatible with Qt Designer. When it tries to load my custom widget plugin, I get this: ValueError: API 'QString' has already been set to version 1 Is it possible to move to API 2 and still keep using Qt Designer? Cheers, -- Sybren A. Stüvel syb

Re: [PyQt] Converting an ugly path to a shell path

2010-09-14 Thread Sybren A. Stüvel
shlex module for that. But - only if you actually _know_ what the command is, and what its arguments are. For example, how would you know that the user isn't trying to run the "ls /home/usr/test" executable and pass it "dir/" as the first argument? -- Sybren A. Stüvel

Re: [PyQt] Converting an ugly path to a shell path

2010-09-13 Thread Sybren A. Stüvel
arguments to subprocess.Popen, they will be "received" by the application just as- is. No escaping needed. import subprocess proc = subprocess.Popen([command, path]) -- Sybren A. Stüvel syb...@stuvel.eu http://stuvel.eu/ signature.asc Description

Re: [PyQt] pyuic4 crash in 4.7.6

2010-09-13 Thread Sybren A. Stüvel
On Monday 13 September 2010 12:11:48 Gökçen Eraslan wrote: > That's fixed in the latest snapshot, by the way. Great, thanks! -- Sybren A. Stüvel http://stuvel.eu/ signature.asc Description: This is a digitally signed message part. ___ PyQt

Re: [PyQt] pyuic4 crash in 4.7.6

2010-09-07 Thread Sybren A. Stüvel
loper go through. I'll wait for a proper fix ;-) Regards, -- Sybren A. Stüvel syb...@stuvel.eu http://stuvel.eu/ signature.asc Description: This is a digitally signed message part. ___ PyQt mailing listPyQt@riverb

[PyQt] pyuic4 crash in 4.7.6

2010-09-07 Thread Sybren A. Stüvel
s run, and not the Cygwin version. It's really the upgrade to 4.7.6 that induced this error. Downgrading to 4.7.4 gives me an ExpatError on the above test.ui, which I expected because it's not a valid XML file. Building my real UI files works just fine after the downgrade. Regards, -- Syb

Re: [PyQt] connections vs. instance variables

2010-09-03 Thread Sybren A. Stüvel
t is more lightweight an instance variable or a connection? > > I'm sure this must be common. > Are there guidelines to use, rules of thumb etc? > > Thanks, > ~Eric -- Sybren A. Stüvel syb...@stuvel.eu http://stuvel.eu/

Re: [PyQt] Listview, scrollbar, empty row

2010-08-24 Thread Sybren A. Stüvel
t play with the > scrollbar/rows of a listview. Or can I? No idea, I was just merely suggesting a CSS approach. Regards, -- Sybren A. Stüvel syb...@stuvel.eu http://stuvel.eu/ signature.asc Description: This is a digitally signed message part. ___

Re: [PyQt] Listview, scrollbar, empty row

2010-08-24 Thread Sybren A. Stüvel
m value, > > - Or add an empty row in listview without passing via model. > > I am really interested in knowing how to achieve any of the above > or if there's any other solution for this. > > Thanks, > Mru -- Sybren A. Stüvel syb...@stuvel.eu http://stuvel.eu/ s

Re: [PyQt] generic exception handler

2010-08-19 Thread Sybren A . Stüvel
On Thu, Aug 19, 2010 at 12:31:36PM -0500, Steve Borho wrote: > Sorry, I was too quick to dismiss. This does get called when any > unhandled exception occurs, which is what I need. Be aware that sys.excepthook is called from the thread that causes the exception. I streamlined this by emitting a Qt

Re: [PyQt] connect problem on windows xp

2010-07-29 Thread Sybren A . Stüvel
On Thu, Jul 29, 2010 at 08:59:16AM +0200, Fabio Mauri wrote: > Attached you can find the Ui_Wdw class. That wasn't my point. Please make a *minimal* bit of code that shows your problem. > In the last connect, I used a different style because for such a > reason the QObject.connect() i used in the

Re: [PyQt] connect problem on windows xp

2010-07-28 Thread Sybren A. Stüvel
On 27-7-2010 10:30, Fabio Mauri wrote: > the whole file is quite big, but I think that the following is the > interesting part (if you need something more, ask me and I'll post > it): I think we need less, not more. This code won't run anyway, since you didn't provide the Ui_Wdw class. Try to crea

Re: [PyQt] Issue with pyqtSlot(QModelIndex, QModelIndex)

2010-07-27 Thread Sybren A . Stüvel
On Tue, Jul 27, 2010 at 12:05:34PM +0100, Phil Thompson wrote: > Should be fixed in tonight's snapshot - a patch is attached if you > can't wait. > > As this is a regression I'll make a new PyQt release in a few days - > once I've had confirmation that the fix doesn't cause any other > problems.

Re: [PyQt] Issue with pyqtSlot(QModelIndex, QModelIndex)

2010-07-26 Thread Sybren A . Stüvel
On Tue, Jul 27, 2010 at 06:12:23AM +0200, Sybren A. Stüvel wrote: > smodel = self.resultsView.selectionModel() > smodel.currentChanged.connect(self.on_change) PS: This does work in concert with the @QtCore.pyqtSignal(...) decorator: QtCore.QObject.connect(

Re: [PyQt] Issue with pyqtSlot(QModelIndex, QModelIndex)

2010-07-26 Thread Sybren A . Stüvel
On Tue, Jul 27, 2010 at 12:36:02PM +0800, 机械唯物主义 : linjunhalida wrote: > in my OS, works OK. pythonxy 4.6 What's pythonxy? And what is your OS? > try: > smodel.currentChanged[QtCore.QModelIndex, > QtCore.QModelIndex].connect(self.on_change) Thanks for the suggestion. Unfortunately, it doesn't wo

[PyQt] Issue with pyqtSlot(QModelIndex, QModelIndex)

2010-07-26 Thread Sybren A . Stüvel
Dear list, I've just upgraded from PyQt 4.6 (PyQt-Py2.6-gpl-4.6-1.exe) to version 4.7.4 (PyQt-Py2.6-gpl-4.7.4-1.exe), and the upgrade introduced a crash in my program. I've narrowed it down to this example: from PyQt4 import QtCore, QtGui class Dialog(QtGui.QDialog): def __init__

Re: [PyQt] Connect a signal to a signal

2010-06-09 Thread Sybren A. Stüvel
On 9-6-2010 12:43, Jugdish wrote: > Hi, what is the proper way to connect a signal to another signal using > the new-style signal/slot syntax? I've been doing it like this: > > myObj1.mySignal.connect(lambda arg1, arg2: myObj2.mySignal.emit(arg1,arg2)) > > but is there a way to do it without usin

Re: [PyQt] Mutiprocessing and QThread

2010-05-24 Thread Sybren A. Stüvel
On 23-5-2010 19:26, Martin Alderete wrote: > What is the best way to concurrency in PyQt QThread or multiprocessing ? IMO multiprocessing is always better than multithreading. Multithreading is difficult at the best of times, as it's very difficult to predict. I've heard Guido say that it's too di

Re: [PyQt] Fwd: segfault after upgrades

2010-05-12 Thread Sybren A. Stüvel
'Segmentation fault (core dumped)' > when I close any pyqt UI (with either a menu or the close box). I got the same symptoms. Upgrading pyqt to 4.7.3 seems to help a bit, but doesn't solve it entirely. -- Sybren A. Stüvel syb...@stuvel.eu http://stuvel.eu/ signature.asc Des

Re: [PyQt] QLineEdit drop event

2010-04-28 Thread Sybren A. Stüvel
mpletely new > instance? Or is there another way I don't see? You can register your subclass in the designer, and tell it to replace the QLineEdit instances with your subclass. In the field that would ordinarily hold the .h file that defines the subclass, enter the .py file instead. Regards,

Re: [PyQt] Forum

2010-04-08 Thread Sybren A. Stüvel
at * http://dir.gmane.org/gmane.comp.python.pyqt-pykde * http://www.mail-archive.com/pyqt%40riverbankcomputing.com/ - > Who agrees with me? Nope, sorry. Regards, -- Sybren A. Stüvel http://stuvel.eu/ signature.asc Descr

[PyQt] Disposing of a QApplication

2010-03-12 Thread Sybren A. Stüvel
ail("Failed to quit the application") del self.app self.fail("Done") It's done in a unittest.TestCase class, and the self.fail() calls are there so that I can quickly see what's going on. What would you recommend? -- Sybren A. Stüvel sy

Re: [PyQt] New PyQt APIs

2010-02-16 Thread Sybren A. Stüvel
pose to make our own > __future__ module (or package), so > that you can just write: > > from PyQt4.__future__ import QString I can do simply "from PyQt4.QtCore import QString" and then use it. Can you give an example of where this fails? -- Sybren A. Stüvel syb...@stuvel.eu htt

Re: [PyQt] List-like objects and QVariant

2010-01-21 Thread Sybren A. Stüvel
Thank you for providing a fix in the future, and for giving me a workaround now. Regards, -- Sybren A. Stüvel syb...@stuvel.eu http://stuvel.eu/ signature.asc Description: This is a digitally signed message part. ___ PyQt mailing listPyQt@riverba

[PyQt] List-like objects and QVariant

2010-01-20 Thread Sybren A. Stüvel
hey are the same. self.assertEqual(pyobj, original_object) --- I hope you can help me to fix this issue. Regards, -- Sybren A. Stüvel syb...@stuvel.eu http://stuvel.eu/ signature.asc Description: This is a digitally signed message part.