Hi Algis

This example is based on on PyQt to show how this work on PyQt maybe
we should change this to PySide code.

But in the same PSEP you can see a table with the PyQt and PySide
differences, and in this table show you to replace  "pyqtSignal" to
PySide style "Signal", if you do that you can have the example
working..

Thanks for you e-mail and keep telling us your feelings about PySide.



On Wed, Oct 27, 2010 at 10:04 PM, Algis Kabaila <[email protected]> wrote:
> Hi,
>
> My  knowledge of Qt is between None and rudimentary.  I am trying to
> come to grips with PySide.  Here is a try to run of the example on
> Signals and Slots in psep100:
>
> #!/usr/bin/env python
> # signal.py - try PySide signal slot  convention
>
> from PySide import QtCore
>
> class Foo(QtCore.QObject):
>
>    # Define a new signal called 'trigger' that has no arguments.
>    trigger = QtCore.pyqtSignal()
>
>    def connect_and_emit_trigger(self):
>        # Connect the trigger signal to a slot.
>        self.trigger.connect(self.handle_trigger)
>        # Emit the signal.
>        self.trigger.emit()
>
>    def handle_trigger(self):
>        # Show that the slot has been called.
>        print "trigger signal received"
>
> if __name__ == "__main__":
>    foo = Foo()
>    foo.connect_and_emit_trigger()
>
> When I run this program (signal.py),  I get the following dialog (My
> kubuntu 10.10 OS, the PC is imodestly named "supremo"; my user name is
> ak):
>
> a...@supremo:/dat/work/PySide/examples$ ./signal.py
> Traceback (most recent call last):
>  File "./signal.py", line 6, in <module>
>    class Foo(QtCore.QObject):
>  File "./signal.py", line 9, in Foo
>    trigger = QtCore.pyqtSignal()
> AttributeError: 'module' object has no attribute 'pyqtSignal'
> a...@supremo:/dat/work/PySide/examples$
>
> I am using ubuntu 10.10 libraries for binaries.  My interpretation  of
> the message is that the binaries a way behind psep100 . Perhaps the
> solution is to install Pyside from the last source version released?
>
> BTW, attempted update installation of binaries from ppa:pyside/ppa
> gave a 404 Not found message for maverick Sources.gz and packages.gz.
> Should I ignore these warnings?
>
> OldAl.
> --
> Algis Kabaila
> http://akabaila.pcug.org.au/
> _______________________________________________
> PySide mailing list
> [email protected]
> http://lists.openbossa.org/listinfo/pyside
>



-- 
Renato Araujo Oliveira Filho
Instituto Nokia de Tecnologia - INdT
Mobile: +55 (81) 8704-2144
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to