Apr-16-2019, 02:55 PM
Here you define data with "data = s.recv(1024)". When you move the code related to connection into it's own method, make sure you still define 'data' before trying to emit the signal. In other words, don't emit the signal unless the data variable exist.