How to pass a string to qthread, PyQt5, directly to the run() function?

94 views Asked by At

I'm doing a login page, mysql query in a separate thread, I can't get it from login_ui lineEdit.text (), I decided to try through signals and slots

I can pass the string through signal.connect(same.funktion) trigger function. But it is not passed to the run() function.

Or tell me how to start the stream and pass the required string there.

Thank you.

class CheckLogin(QtCore.QThread):
    result_request_password = QtCore.pyqtSignal(str, str, str)
    result_anim = QtCore.pyqtSignal(bool)
    login_input = QtCore.pyqtSignal(str)
    
    def __init__(self, parent=None):
        super().__init__(parent)
        # self.login_input.connect(self.text)
        
    # def text (self, input):
    #     login_in = input
    #     return  login_in
    
    def run(self):
        print(self.login_input.signal())
0

There are 0 answers