I was using qthread in a separate file and was controlling the thread from main python file. Then by more searching through the net i found that the better approach is to use worker and movetothread command to run it. The problem fixed. And I don't know if it was related or not. Now i have another problem. Whenever the worker class that substrates from qobject crashes or its connected signal receiver inside main python file crashes though i cash the error using try except method but the whole app crashes i should admit that when i was changing the thread to worker i removed the part if name = main: ...
From worker file. And i also added a super constructor inside def init of worker class