[PyQt] changing model for QTree

2009-01-27 Thread Sven Pohle
Hi, i am having problems wrapping my head around on how to modify a model of a Qtree i have set up. my model consists out of a few children under root and each child has some children of it's own. to start of with i followed the simpleTreeModel example and got to the stage where my model gets corre

[PyQt] How to handle unix signals in PyQt

2009-01-27 Thread Bobby R. Ward
I can't figure out how to handle unix signals in PyQt. If I try to connect to the unixSignal signal of QCoreApplication, nothing happens. I've noticed that the C++ examples call *watchUnixSignal*(signal_num, true) but this isn't exposed in PyQt. If I try to use python's standard signal handlers

[PyQt] best way to manage forms?

2009-01-27 Thread Linos
Hello, i have been reading about qdatawidgetmapper and qsqltablemodel or qsqltablerelationalmodel but i am not sure any combination of them can fills my needs or if i could do in a better way. For an example form that i would need to manage i have a customer table and an address table (becaus

Re: [PyQt] Dialogue box with hyperlink

2009-01-27 Thread Giovanni Bajo
On mar, 2009-01-27 at 15:11 -0500, Darryl Wallace wrote: > Hello, > > Has anyone somewhere an example code of a small dialogue box which > > contains a hyperlink to a web site? > > > > I would like to point the user to some web site, in the confirmation > > dialogue I want to show. > > > Quick wa

Re: [PyQt] Dialogue box with hyperlink

2009-01-27 Thread Sergio Jovani
A Dimarts 27 Gener 2009 21:11:22, Darryl Wallace va escriure: > Hello, > > > Has anyone somewhere an example code of a small dialogue box which > > contains a hyperlink to a web site? > > > > I would like to point the user to some web site, in the confirmation > > dialogue I want to show. > > Quick

Re: [PyQt] Dialogue box with hyperlink

2009-01-27 Thread Darryl Wallace
Hello, Has anyone somewhere an example code of a small dialogue box which contains a hyperlink to a web site? I would like to point the user to some web site, in the confirmation dialogue I want to show. Quick way is to use a QLabel with tags in the string and then using the standard html

[PyQt] Dialogue box with hyperlink

2009-01-27 Thread Geert Vancompernolle
Hi, Has anyone somewhere an example code of a small dialogue box which contains a hyperlink to a web site? I would like to point the user to some web site, in the confirmation dialogue I want to show. -- Best rgds, Geert *Use EcoCho

[PyQt] QThread, suggestions.

2009-01-27 Thread Matt Smith
In java they have the "SwingWorker" class and I thought of a way to implement something similar in python. Here is the code: http://paste.pocoo.org/show/101578/ I use this for starting long running processes. Here is an example of how I have used it. http://orangepalantir.org/files/threadwor

Re: [PyQt] Programmatically changing the input method, and a missing qinputcontextfactory

2009-01-27 Thread Phil Thompson
On Sat, 24 Jan 2009 17:25:18 +0900, Damien Elmes wrote: > Hi folks, > > In my application (http://ichi2.net/anki/) I'd like text input fields > to remember the last input method, so that if a user is inputting > Japanese into one field and English in another, they don't have to > switch between i

Re: [PyQt] Roadmap suggestion: raise exception when connect() fails

2009-01-27 Thread Phil Thompson
On Wed, 21 Jan 2009 19:58:06 +0100, Giovanni Bajo wrote: > Hello, > > a problem that often arise when programming with PyQt is that > QObject.connect() simply returns False when a connection fails. > Sometimes you get some debug output on the console (coming from Qt), but > this is not true if

Re: [PyQt] QVariant bug in 4.4.3 and 4.4.4

2009-01-27 Thread Phil Thompson
On Sun, 25 Jan 2009 23:25:37 +0100, Albert Cervera i Areny wrote: > I've found a bug in both PyQt 4.4.3 and 4.4.4, though the bug differs in > those > two versions it works correctly with 4.4.2. > > Running the code below under 4.4.3 returns an empty list: > > from PyQt4.QtCore import QVariant

Re: [PyQt] QGraphicsScene/Item/View coordinates

2009-01-27 Thread Frédéric
On dimanche 25 janvier 2009, Frédéric wrote: > When I create all items representing the pictures, I use the following > code: > > def paint(self, painter, options, widget): >     ... >     painter.fillRect(x, y, w, h, QtGui.QColor("green")) >     painter.setPen(QtGui.QPen(QtGui.QBrush(QtGui.QColor