On Friday 11 March 2011 11:54:29 Renato Araujo Oliveira Filho wrote:
> Hi Mark,
> 
> This should work with:
> 
> foo1.valueChanged[float].connect(foo2.setValue)
> 
> Then please, could you report a but for that?

I already did it.

http://bugs.pyside.org/show_bug.cgi?id=722
 
> Thanks
> 
> On Fri, Mar 11, 2011 at 11:24 AM, Mark Moll <[email protected]> wrote:
> > The following snippet of code works in PyQt4, but not in PySide:
> > 
> > #!/usr/bin/env python
> > import sys
> > from PySide import QtCore, QtGui
> > app = QtGui.QApplication(sys.argv)
> > foo1 = QtGui.QDoubleSpinBox()
> > foo2 = QtGui.QDoubleSpinBox()
> > foo1.valueChanged.connect(foo2.setValue)
> > foo2.valueChanged.connect(foo1.setValue)
> > foo1.show()
> > foo2.show()
> > sys.exit(app.exec_())
> > 
> > In PySide I get this error when I change the value of one of the
> > QDoubleSpinBoxes:
> > 
> > Error calling slot "setValue"
> > TypeError: 'PySide.QtGui.QDoubleSpinBox.setValue' called with wrong
> > argument types: PySide.QtGui.QDoubleSpinBox.setValue(unicode)
> > Supported signatures:
> >  PySide.QtGui.QDoubleSpinBox.setValue(float)
> > 
> > I assume there’s something different in the signals and slots API, but I
> > can’t figure out what. If I change the signal setup to this:
> > 
> > foo1.valueChanged[float].connect(foo2.setValue)
> > 
> > it won’t even run, because I get this error:
> > 
> > Traceback (most recent call last):
> >  File "foo.py", line 7, in <module>
> >   foo1.valueChanged[float].connect(foo2.setValue)
> > IndexError: Signature valueChanged(qreal) not found for signal:
> > valueChanged
> > 
> > This is all on OS X 10.6.6, Qt 4.7.1, and PySide installed through
> > MacPorts.
> > 
> > --
> > Mark Moll
> > 
> > 
> > 
> > _______________________________________________
> > PySide mailing list
> > [email protected]
> > http://lists.pyside.org/listinfo/pyside

-- 
Hugo Parente Lima
INdT - Instituto Nokia de Tecnologia

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to