[PyQt] Re: communication between two classes which in different threading

2007-04-05 Thread Marco
Yes, use signal/slot could reslove this question! On 4/6/07, Marco <[EMAIL PROTECTED]> wrote: Hello, I write two class, which one is Gui(PyQt4) other is socket server. I wanna: if socket recv() something, Gui will show it in a label. But it seems that I cannot call the func from other threadi

[PyQt] communication between two classes which in different threading

2007-04-05 Thread Marco
Hello, I write two class, which one is Gui(PyQt4) other is socket server. I wanna: if socket recv() something, Gui will show it in a label. But it seems that I cannot call the func from other threading. How to reslove it? Thank you! -- LinuX Power __

Re: *** GMX Spamverdacht *** Re: [PyQt] Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Andreas Pakulat
On 05.04.07 22:24:58, Phil Thompson wrote: > On Thursday 05 April 2007 6:42 pm, Andreas Pakulat wrote: > > Tried printfs and fprintfs (to stderr), but I don't see anything when > > running the python application... sip+PyQt4 is built in debug mode, do I > > need to do something else? > > No - assu

Re: [PyQt] Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Phil Thompson
On Thursday 05 April 2007 6:42 pm, Andreas Pakulat wrote: > On 05.04.07 17:19:56, Phil Thompson wrote: > > On Thursday 05 April 2007 3:02 pm, Andreas Pakulat wrote: > > > Well, the problem with internalPointer is that you can't easily check > > > wether the object it carries is valid. With internal

Re: [PyQt] Re: [PyKDE] Re: QAbstractItemModel 64 bit problem

2007-04-05 Thread Phil Thompson
On Thursday 05 April 2007 6:09 pm, Jeremy Sanders wrote: > Phil Thompson wrote: > > This is the correct behaviour. > > > > On 64 bits int is 4 bytes and long and void* are 8 bytes. Python ints are > > actually C longs. The value of id() is greater than 4 bytes so you lose > > bits when you call cre

Re: [PyQt] Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Andreas Pakulat
On 05.04.07 17:19:56, Phil Thompson wrote: > On Thursday 05 April 2007 3:02 pm, Andreas Pakulat wrote: > > Well, the problem with internalPointer is that you can't easily check > > wether the object it carries is valid. With internalId you get an > > KeyError when trying to index into the dict... >

[PyQt] Re: [PyKDE] Re: QAbstractItemModel 64 bit problem

2007-04-05 Thread Jeremy Sanders
Phil Thompson wrote: > This is the correct behaviour. > > On 64 bits int is 4 bytes and long and void* are 8 bytes. Python ints are > actually C longs. The value of id() is greater than 4 bytes so you lose > bits when you call createIndex(). Thanks for the response - I thought that might be the

Re: [PyQt] Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Phil Thompson
On Thursday 05 April 2007 3:02 pm, Andreas Pakulat wrote: > On 05.04.07 14:21:44, Phil Thompson wrote: > > On Thursday 05 April 2007 1:12 pm, Andreas Pakulat wrote: > > > On 05.04.07 12:14:01, Phil Thompson wrote: > > > > The spelling of itemdict on line 120 - the line that generates all > > > > th

[PyQt] Re: [PyKDE] Re: QAbstractItemModel 64 bit problem

2007-04-05 Thread Phil Thompson
I may be slow sometimes, but I'll get there in the end... On Tuesday 26 September 2006 12:16 pm, Jeremy Sanders wrote: > On Tue, 26 Sep 2006, Jeremy Sanders wrote: > > The python Ids appear to be large integer values, e.g. 183006915920, but > > when they are returned from internalId(), then they c

Re: *** GMX Spamverdacht *** Re: *** GMX Spamverdacht *** Re: [PyQt] Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Andreas Pakulat
On 05.04.07 14:21:44, Phil Thompson wrote: > On Thursday 05 April 2007 1:12 pm, Andreas Pakulat wrote: > > On 05.04.07 12:14:01, Phil Thompson wrote: > > > The spelling of itemdict on line 120 - the line that generates all those > > > exception messages. Maybe you didn't attach the version you inte

Re: *** GMX Spamverdacht *** [PyQt] Re: *** GMX Spamverdacht *** Re: Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Andreas Pakulat
On 05.04.07 14:01:31, Jeremy Sanders wrote: > Andreas Pakulat wrote: > > > Uhm, right, overlooked that one. > > But the problem still persists, what I see here is: > > KeyError: -1212033192L > > Traceback (most recent call last): > > File "simpletreemodel.py", line 88, in data > > item = sel

Re: *** GMX Spamverdacht *** Re: [PyQt] Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Phil Thompson
On Thursday 05 April 2007 1:12 pm, Andreas Pakulat wrote: > On 05.04.07 12:14:01, Phil Thompson wrote: > > On Thursday 05 April 2007 11:44 am, Andreas Pakulat wrote: > > > On 05.04.07 11:28:23, Phil Thompson wrote: > > > > On Thursday 05 April 2007 1:01 am, Andreas Pakulat wrote: > > > > > Hi, > >

[PyQt] Re: *** GMX Spamverdacht *** Re: Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Jeremy Sanders
Andreas Pakulat wrote: > Uhm, right, overlooked that one. > But the problem still persists, what I see here is: > KeyError: -1212033192L > Traceback (most recent call last): > File "simpletreemodel.py", line 88, in data > item = self.itemdict[index.internalId()] > KeyError: -1212033192L > Tr

Re: *** GMX Spamverdacht *** Re: [PyQt] Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Andreas Pakulat
On 05.04.07 12:14:01, Phil Thompson wrote: > On Thursday 05 April 2007 11:44 am, Andreas Pakulat wrote: > > On 05.04.07 11:28:23, Phil Thompson wrote: > > > On Thursday 05 April 2007 1:01 am, Andreas Pakulat wrote: > > > > Hi, > > > > > > > > the latest eric4 snapshots seem to not work wrt model/vi

Re: [PyQt] Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Phil Thompson
On Thursday 05 April 2007 11:44 am, Andreas Pakulat wrote: > On 05.04.07 11:28:23, Phil Thompson wrote: > > On Thursday 05 April 2007 1:01 am, Andreas Pakulat wrote: > > > Hi, > > > > > > the latest eric4 snapshots seem to not work wrt model/view stuff, first > > > I thought its because they create

Re: [PyQt] Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Andreas Pakulat
On 05.04.07 11:28:23, Phil Thompson wrote: > On Thursday 05 April 2007 1:01 am, Andreas Pakulat wrote: > > Hi, > > > > the latest eric4 snapshots seem to not work wrt model/view stuff, first > > I thought its because they create model indexes using > > > > createIndex(row,col,item) > > > > where it

Re: *** GMX Spamverdacht *** Re: [PyQt] ModelTest for PyQt4 models

2007-04-05 Thread Andreas Pakulat
On 04.04.07 21:29:25, Phil Thompson wrote: > On Wednesday 04 April 2007 8:51 pm, Andreas Pakulat wrote: > > Hi, > > > > I ported the ModelTest from Trolltech Labs to python so it can be used > > with PyQt4 apps. http://labs.trolltech.com/page/Projects/Itemview/Modeltest > > > > Phil, would be cool

Re: [PyQt] Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Phil Thompson
On Thursday 05 April 2007 1:01 am, Andreas Pakulat wrote: > Hi, > > the latest eric4 snapshots seem to not work wrt model/view stuff, first > I thought its because they create model indexes using > > createIndex(row,col,item) > > where item is an instance of a class, however when getting an index t