Hi,

I've a strange result with pyqtsignal, the argument transmit with the signal,
an instance of QImage, is not the same in the slot.

Exemple with this code:
-------------------------------------------------

# -*- coding: utf-8 -*-

import sys
import os

from PyQt4 import QtCore, QtGui

class Viewing(QtCore.QObject):
    loadingImage = QtCore.pyqtSignal()
    imageLoaded = QtCore.pyqtSignal(QtGui.QImage)
    def __init__(self):
        QtCore.QObject.__init__(self)

    def load_image(self, img):
        self.current_view = QtGui.QImage(img)
        print "Send : %s" % self.current_view
        self.imageLoaded.emit(self.current_view)

def on_load_image(img):
    print "Receive : %s" % img

if __name__ == "__main__":
    viewing = Viewing()
    viewing.imageLoaded.connect(on_load_image)
    viewing.load_image("/home/vincent/DSC00690.JPG")
----------------------------------------------------

Result:
    Send : <PyQt4.QtGui.QImage object at 0x95b917c>
    Receive : <PyQt4.QtGui.QImage object at 0x95b91ac>


Linux-2.6.32-31-generic-i686-with-Ubuntu-10.04-lucid
Qt            4.6.2
Python        2.6.5
PyQt        4.7.2
Sip            4.10.1

Regards



--
Vincent V.V.
Oqapy . Qarte+7 . PaQager
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to