[PyQt] QPersistentModelIndex problem

2009-02-06 Thread Roberto Alsina
I am trying to inherit QAbstractItemModel and am having problems implementing parent(). In order to do it correctly to represent a tree structure, I am storing a QPersistentModelIndex in my tree node. However, parent needs to return a plain QModelIndex. AFAICS, this is how you convert: QPersi

[PyQt] Windows/OS X installers for PyQt4 apps

2009-02-06 Thread Mark Voorhies
I am starting work on a Python/Qt4 based GUI and am looking for advice on packaging the finished application for Windows XP and OS X. The details are: * The development is being done on Linux (Ubuntu and Debian), so open source packaging tools that run on Linux are preferred. * I am using

Re: [PyQt] Error: Can't Import Anything

2009-02-06 Thread Chris Giles
> > Since we've established that recompiling PyQt using Python v2.6 doesn't fix > the problem, what shall I try next? > The problem was that the old "/usr/lib/python2.5/site-packages/PyQt4/" directory still contained some ".pyc" files, so I removed it completely and PyQt4 is now working again. Th

Re: [PyQt] Error: Can't Import Anything

2009-02-06 Thread Chris Giles
> > I lodged the following bug report and additional comment earlier: >> http://bugs.archlinux.org/task/13133 >> >> Does anyone know what I must do to make PyQt4 work with Python v2.6 >> instead of Python v2.5? >> > > Just recompile it. Thanks for the reply, but I'm surprised that you thought I w

Re: [PyQt] QGraphicsScene/Item/View optimisation

2009-02-06 Thread Frédéric
On vendredi 06 février 2009, dbod...@trolltech.com wrote: > I guess this tool would have been useful: > > http://www.digitalfox.org/projets/qPyProfiler/ > > Maybe it will also help you track down any other performance issues you > encounter. Thanks! I still need to optimize things, as refreshing

Re: [PyQt] QGraphicsScene/Item/View optimisation

2009-02-06 Thread dboddie
On Fri Feb 6 15:05:12 GMT 2009, Frédéric wrote: > I finally found that the paint() method is very slow, and use all the > CPU. I re-designed my app so I don't have to use it (I just draw > rectangles or ellipses, so I used the related items). And it is now very > fast. I guess this tool would hav

Re: [PyQt] QUrl paths under Windows seem weird

2009-02-06 Thread Sergio Jovani
A Divendres 06 Febrer 2009 15:42:30, Grzegorz Adam Hankiewicz va escriure: > El 06/02/2009, a las 15:19, Sergio Jovani escribió: > > Hi, > > > > Even it is not a Qt method, you can do it with os.path.normcase(). > > That function doesn't help at all, did you try it yourself? > > Python 2.5.2 (r252:

[PyQt] QSortFilterProxyModel segmentation fault

2009-02-06 Thread Baba-k
Hi, I've encoutered a problem whereby I get a seg fault when trying to access an item object returned by index.internalPointer() when using a proxy model. If I use the item model it is fine. I've attached a modified version of the simpletreemodel example from the docs that I've modified to use a

Re: [PyQt] QGraphicsScene/Item/View optimisation

2009-02-06 Thread Frédéric
Le 6/2/2009, "Jan Ekholm" a écrit: >At least don't use a thread to update GUI stuff, you'll just cause yourself a >lot of problems and crashes. I finally found that the paint() method is very slow, and use all the CPU. I re-designed my app so I don't have to use it (I just draw rectangles or el

Re: [PyQt] make failed for SIP-4.7.9

2009-02-06 Thread Phil Thompson
On Fri, 6 Feb 2009 18:26:23 +0530, tanay wrote: > Hello, > > I'm trying to install SIP-4.7.9 > 'python configure.py' works fine but make gives a huge list of errors. > (find > the list attached) > > Why is this happening and how can i solve it ? Maybe you haven't got python-dev packages install

Re: [PyQt] QUrl paths under Windows seem weird

2009-02-06 Thread Grzegorz Adam Hankiewicz
El 06/02/2009, a las 15:19, Sergio Jovani escribió: Hi, Even it is not a Qt method, you can do it with os.path.normcase(). That function doesn't help at all, did you try it yourself? Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyr

Re: [PyQt] Deselecting items in qtreeview

2009-02-06 Thread Baba-k
Riteo so this seems to be because I'm using a QSortFilterProxyModel ontop of my item model. If I dont use the proxy then everything is fine. Does anyone have any ideas as to why the proxy model would be affecting the selection in this way ? thanks alot babak -- View this message in context: h

Re: [PyQt] QUrl paths under Windows seem weird

2009-02-06 Thread Sergio Jovani
A Divendres 06 Febrer 2009 14:48:39, Grzegorz Adam Hankiewicz va escriure: > Hello. > > I'm implementing a drag and drop application where the user drags > files from the explorer and drops them on a label. The label processes > the files and loads them. > > Under MacOSX this is working all well, b

[PyQt] QUrl paths under Windows seem weird

2009-02-06 Thread Grzegorz Adam Hankiewicz
Hello. I'm implementing a drag and drop application where the user drags files from the explorer and drops them on a label. The label processes the files and loads them. Under MacOSX this is working all well, but under Windows I am getting paths like u"/C:/Documents and Settings/blah blah

[PyQt] compare EditTriggers

2009-02-06 Thread Mads Ipsen
Suppose I say tree_view = QTreeView() tree_view.setEditTriggers(QAbstractItemView.DoubleClicked | QAbstractItemView.SelectedClicked) Then I can query the flags I just set by calling triggers = tree_view.editTriggers() But how do I test that the flags that I just have set actually are the ones r

Re: [PyQt] QGraphicsScene/Item/View optimisation

2009-02-06 Thread Jan Ekholm
On Friday 06 February 2009, Frédéric wrote: > Le 5/2/2009, "Grissiom" a écrit: > > I think you may try some CacheFlag or OptimizationFlag in QGraphicsView, > > see: > > > >http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsview.h > >tml#CacheModeFlag-enum > > http://www.riverbankc

Re: [PyQt] QGraphicsScene/Item/View optimisation

2009-02-06 Thread Brian Kelley
I have had great success with QtGui.QGraphicsItemAnimation alleviating the same issues that you are looking at. It looks like that your PictureItem is returning a really large bounding box so that caching system is repainting all or most of them at every step. Sometime it helps in debugging to

[PyQt] make failed for SIP-4.7.9

2009-02-06 Thread tanay
Hello, I'm trying to install SIP-4.7.9 'python configure.py' works fine but make gives a huge list of errors. (find the list attached) Why is this happening and how can i solve it ? -- tanay siplib.c:4271: error: ???PyObject??? undeclared (first use in this function) siplib.c:4271: error: ???se

Re: [PyQt] QGraphicsScene/Item/View optimisation

2009-02-06 Thread Frédéric
Le 5/2/2009, "Grissiom" a écrit: > I think you may try some CacheFlag or OptimizationFlag in QGraphicsView, see: > >http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsview.html#CacheModeFlag-enum >http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsview.html#Optim

Re: [PyQt] Error: Can't Import Anything

2009-02-06 Thread Phil Thompson
On Fri, 6 Feb 2009 22:06:31 +1100, Chris Giles wrote: > Hi Guys > > I lodged the following bug report and additional comment earlier: > http://bugs.archlinux.org/task/13133 > > Does anyone know what I must do to make PyQt4 work with Python v2.6 instead > of Python v2.5? Just recompile it. Phil

[PyQt] Error: Can't Import Anything

2009-02-06 Thread Chris Giles
Hi Guys I lodged the following bug report and additional comment earlier: http://bugs.archlinux.org/task/13133 Does anyone know what I must do to make PyQt4 work with Python v2.6 instead of Python v2.5? Chris ___ PyQt mailing listPyQt@riverbankcom

Re: [PyQt] Getting it ready to ship.

2009-02-06 Thread Mads Ipsen
- Original Besked Fra: Knapp Til: pyqt@riverbankcomputing.com Emne: [PyQt] Getting it ready to ship. Dato: 06/02/09 09:51 > OK, I now have a little finished project that I want to send out to > buyers so they can take a look. How do I get the python into a format > that the code

[PyQt] boundingRegion()

2009-02-06 Thread Frédéric
Hi, I draw a crosshair cursor on a scene. This crosshair is defined as followed: class CrosshairCusrsor(QtGui.QGraphicsItemGroup): def __init__(self, parent=None): QtGui.QGraphicsItemGroup .__init__(self, parent) self._yawLine = QtGui.QGraphicsLineItem() self._yawLin

[PyQt] Getting it ready to ship.

2009-02-06 Thread Knapp
OK, I now have a little finished project that I want to send out to buyers so they can take a look. How do I get the python into a format that the code can not be stolen (without work anyway) and it is only a one click install? I need all three but Linux and Windows are the most important. I have l

Re: [PyQt] PyKDE segfaults when calling group() on KSharedConfig object

2009-02-06 Thread Benno Dielmann
Hi, thanks, Simon, for looking into this and in general for your great work on PyKDE :-). I'm using KGlobal.config() in my application now. What is the difference between this and KSharedConfig.openConfig()? What is the preferred way of getting access to the configuration system? From the

[PyQt] Re: Is it possible to subclass QSqlDatabase?

2009-02-06 Thread Wolfgang Rohdewald
On Freitag, 6. Februar 2009, Mattia Borsalino wrote: > class MyDatabase(QSqlDatabase): > """ > subclasses QSqlDatabase > """ > def __init__(self, parent=None): > super(MyDatabase, self).__init__(parent) according to the docu, parent should either not be passed or it should