PyQt signals/slots with large integers

10 Views Asked by At

I am trying to emit the file size of some very large files in python and discovered that signals seem to limit the size of an integer to 1874919424, which can be seen in the following example. Reading up on python integers it seems they are (virtually of course) infinite, causing me to think this is an internal Qt C++ related issue. So is there a different way to work with large numbers in signals/slots?

class Emitter(QtCore.QObject):
    sendNum = QtCore.pyqtSignal(int)
    
    @QtCore.pyqtSlot(int)
    def receive(self, int):
        print(int)
    
obj1 = Emitter()
obj1.sendNum.connect(obj1.receive)
obj1.sendNum.emit(10000000000000000)
# >> 1874919424
0

There are 0 best solutions below