Re: [PyQt] Packaging Error in python-qt [Linux-RPM]
On Thursday 28 June 2012, 11:05:51 Phil Thompson wrote: > On Thu, 28 Jun 2012 10:48:21 +0200, Sascha Manns > > > wrote: > > Hello Phil, > > > > Am Donnerstag, 28. Juni 2012, 09:27:03 schrieb Phil Thompson: > >> On Wed, 27 Jun 2012 21:48:10 +0200, Sascha Manns > >> > >> > >> wrote: > >> > Hello mates, > >> > > >> > i'm trying to package the python-qt and sip components for our > >> > Plasma Active > >> > Stack. > >> > I'm using PyQt-x11-gpl-4.9.3.tar.bz2 and sip-4.13.3+hg20120627. > >> > The sip component is packaged as "sip" and sip is added as > > BuildRequire > > >> > and > >> > Require in the python-qt4 spec. > >> > But python-qt4 makes trouble. I'm getting: > >> > > >> > + python configure.py --confirm-license --qsci-api -u > >> > Error: This version of PyQt requires SIP v4.13.3 or later > >> > > >> > How the configure.py script detects the right version? > >> > >> By importing the sipconfig module. > > > > Do you have any ideas how i can check, why the sipconfig modules > > gives > > the > > > false version? > > Do i need any other Build Depencies than your SIP Package? > > I don't know - you are not using packages I provide. I don't provide > .bz2 files and I don't know what sip-4.12.3+hg20120627 is. Sascha, just check my packages on OBS: Here: https://build.opensuse.org/project/show?project=home%3Afrispete%3APyQt and here: https://build.opensuse.org/project/show?project=home%3Afrispete%3APyQt-next While they are bit rotten¹ for a while now, the basic specs are sound - all new builds are triggered from scripts, which are running for more than nine month without any human intervention - therefor the outcome is still pretty high ;-) Pete ¹) Beg my pardon, but I'm continuesly overloaded ATM - I will look for these things as soon as possible (which doesn't mean anything)... ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] New vs new signals - signatures
On 6/29/2012 2:00 AM, Phil Thompson wrote: They should be interchangeable. In the current of PyQt a bound signal has >>a "signal" attribute that is the corresponding C++ signal so you can >>check >>what signature is actually being used. > >Not sure exactly what you mean here, I have tried the following > >print self.picker.selected.signal > >and get "'PyQt4.QtCore.pyqtBoundSignal' object has no attribute 'signal'" What version of PyQt? Like I said, this is available in the current version. Actually, Phil, you didn't quite get that said... the word "version" was omitted... but we will overlook that because you are so timely and responsive with all your help on this list... but it may have caused a bit of confusion for John in this case. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] New vs new signals - signatures
On Fri, 29 Jun 2012 21:51:34 +1000, John Floyd wrote: > On Fri, 29 Jun 2012 10:00:44 you wrote: >> On Fri, 29 Jun 2012 18:02:47 +1000, John Floyd >> >> wrote: >> > On Fri, 29 Jun 2012 08:52:00 you wrote: >> >> On Fri, 29 Jun 2012 17:22:51 +1000, John Floyd >> >> >> >> wrote: >> >> > The question relates to the signatures used to connect overloaded >> >> >> >> signals. >> >> >> >> > What do you use for signature in the new signals. I have tried >> >> > using >> >> >> >> the >> >> >> >> > same >> >> > arguments that are specified in the old method but does not work. >> >> > >> >> > Eg an example from pyqwt >> >> > >> >> > old method >> >> > >> >> > self.picker.connect(self.picker, SIGNAL('selected(const >> >> > QwtPolygon&)'), >> >> > >> >> > self.slotter) >> > >> > This works >> > >> >> > have tried >> >> > >> >> > self.picker.selected[QwtPolygon].connect(self.slotter) >> >> > >> >> > and >> >> > >> >> > self.picker.selected['QwtPolygon'].connect(self.slotter) >> >> > >> >> > with no success. >> >> >> >> Define "no success". >> > >> > The 2nd call results in "KeyError: 'there is no matching overloaded >> > signal'" >> >> What does the first call result in? > Actually QwtPolygon does not appear to be defined at the python level. So it's never going to work. You need to find out how PyQwt implements QwtPolygon. > The reason I tried it was that a listing of signals (a short script that > scanned the gmetaobject) indicated that this was the valid variable type > and > that the old style works. As a string index is acceptable - what string > can > be used in the new style? Obviously there is not a one to one > relationship > between signatures in old and new methods. How can we determine those that > are > recognized for the new style. > > I have also tried (based on the arguments to old style connect > self.picker.selected['selected(const QPolygon)'].connect(self.slotter) > self.picker.selected['QPolygon'].connect(self.slotter) > > with resulting error: TypeError: C++ type . is not supported as a > bound > signal type argument type >> >> >> > the user docs does suggest "A type is either a Python type object or >> >> a >> >> >> > string >> >> > that is the name of a C++ type" >> >> > >> >> > In this regard I have notices that in the code generated from the >> >> > sip >> >> > files, >> >> > the pyqt4QtSignal defintion is >> >> > >> >> > selected(QwtPolygon) >> >> > >> >> > This is particularly confusing where for mappedtypes from a template >> >> >> >> where >> >> >> >> > the >> >> > c++ variable is QArray which is in the c++ signature >> >> > whilst >> >> > the python 'equivalent' is QwtQArrayQwtDoublePoint. >> >> > >> >> > Clarification would be very useful. At the moment I am not sure if >> >> >> >> there >> >> >> >> > is a >> >> > coding problem (mine or at the sip end) or just my ignorance. >> >> >> >> They should be interchangeable. In the current of PyQt a bound signal >> >> has >> >> >> a "signal" attribute that is the corresponding C++ signal so you can >> >> check >> >> what signature is actually being used. >> > >> > Not sure exactly what you mean here, I have tried the following >> > >> > print self.picker.selected.signal >> > >> > and get "'PyQt4.QtCore.pyqtBoundSignal' object has no attribute >> >> 'signal'" >> >> What version of PyQt? Like I said, this is available in the current >> version. > > OK I am running PyQt4 4.8.6 not the very latest. > Is there another way to obtain the signatures that the python signal > methods > recognizes? You can look at the PyQwt source code. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] New vs new signals - signatures
On Fri, 29 Jun 2012 18:02:47 +1000, John Floyd wrote: > On Fri, 29 Jun 2012 08:52:00 you wrote: >> On Fri, 29 Jun 2012 17:22:51 +1000, John Floyd >> >> wrote: >> > The question relates to the signatures used to connect overloaded >> >> signals. >> >> > What do you use for signature in the new signals. I have tried using >> >> the >> >> > same >> > arguments that are specified in the old method but does not work. >> > >> > Eg an example from pyqwt >> > >> > old method >> > >> >self.picker.connect(self.picker, SIGNAL('selected(const >> >QwtPolygon&)'), >> > >> > self.slotter) > This works >> > >> > have tried >> > >> >self.picker.selected[QwtPolygon].connect(self.slotter) >> > >> > and >> > >> >self.picker.selected['QwtPolygon'].connect(self.slotter) >> > >> > with no success. >> >> Define "no success". > The 2nd call results in "KeyError: 'there is no matching overloaded > signal'" What does the first call result in? >> > the user docs does suggest "A type is either a Python type object or a >> > string >> > that is the name of a C++ type" >> > >> > In this regard I have notices that in the code generated from the sip >> > files, >> > the pyqt4QtSignal defintion is >> > >> >selected(QwtPolygon) >> > >> > This is particularly confusing where for mappedtypes from a template >> >> where >> >> > the >> > c++ variable is QArray which is in the c++ signature >> > whilst >> > the python 'equivalent' is QwtQArrayQwtDoublePoint. >> > >> > Clarification would be very useful. At the moment I am not sure if >> >> there >> >> > is a >> > coding problem (mine or at the sip end) or just my ignorance. >> >> They should be interchangeable. In the current of PyQt a bound signal has >> a "signal" attribute that is the corresponding C++ signal so you can >> check >> what signature is actually being used. > > Not sure exactly what you mean here, I have tried the following > > print self.picker.selected.signal > > and get "'PyQt4.QtCore.pyqtBoundSignal' object has no attribute 'signal'" What version of PyQt? Like I said, this is available in the current version. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] New vs new signals - signatures
On Fri, 29 Jun 2012 17:22:51 +1000, John Floyd wrote: > The question relates to the signatures used to connect overloaded signals. > > What do you use for signature in the new signals. I have tried using the > same > arguments that are specified in the old method but does not work. > > Eg an example from pyqwt > > old method > > self.picker.connect(self.picker, SIGNAL('selected(const QwtPolygon&)'), > self.slotter) > > have tried > self.picker.selected[QwtPolygon].connect(self.slotter) > and > self.picker.selected['QwtPolygon'].connect(self.slotter) > with no success. Define "no success". > the user docs does suggest "A type is either a Python type object or a > string > that is the name of a C++ type" > > In this regard I have notices that in the code generated from the sip > files, > the pyqt4QtSignal defintion is > > selected(QwtPolygon) > > This is particularly confusing where for mappedtypes from a template where > the > c++ variable is QArray which is in the c++ signature > whilst > the python 'equivalent' is QwtQArrayQwtDoublePoint. > > Clarification would be very useful. At the moment I am not sure if there > is a > coding problem (mine or at the sip end) or just my ignorance. They should be interchangeable. In the current of PyQt a bound signal has a "signal" attribute that is the corresponding C++ signal so you can check what signature is actually being used. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] New vs new signals - signatures
The question relates to the signatures used to connect overloaded signals. What do you use for signature in the new signals. I have tried using the same arguments that are specified in the old method but does not work. Eg an example from pyqwt old method self.picker.connect(self.picker, SIGNAL('selected(const QwtPolygon&)'), self.slotter) have tried self.picker.selected[QwtPolygon].connect(self.slotter) and self.picker.selected['QwtPolygon'].connect(self.slotter) with no success. the user docs does suggest "A type is either a Python type object or a string that is the name of a C++ type" In this regard I have notices that in the code generated from the sip files, the pyqt4QtSignal defintion is selected(QwtPolygon) This is particularly confusing where for mappedtypes from a template where the c++ variable is QArray which is in the c++ signature whilst the python 'equivalent' is QwtQArrayQwtDoublePoint. Clarification would be very useful. At the moment I am not sure if there is a coding problem (mine or at the sip end) or just my ignorance. Cheers John ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt