'Qthread works but I can't get data

class MainPage(QMainWindow):
    def __init__(self):
        super(MainPage, self).__init__()
        self.ui=Ui_MainWindow()
        self.ui.setupUi(self)
        self.second_page=SecondPage()
        self.ui.btngiris.clicked.connect(self.open2page)
        self.second_page.ui1.profiltakibiinstapy.toggled.connect(self.start)
    def open2page(self):


    def start(self):
        self.a=Thread1()
        self.a.start()

    class SecondPage(QMainWindow):
    def __init__(self):
        super(SecondPage, self).__init__()
        self.ui1=Ui_MainWindow2()
        self.ui1.setupUi(self)

    def instagramprofiltakip(self):
        self.browser = webdriver.Edge()
        self.browser.maximize_window()
        self.browser.get("https://www.instagram.com/")
        time.sleep(5)
        print(str(self.ui1.lnlinstagramkullaniciadi.text()))
        print(self.ui1.lnlinstagramsifre.text())

class Thread1(QThread):
    sonuc=pyqtSignal(object)
    def __init__(self):
        super().__init__()

    def run(self):
        basla=SecondPage()
        basla.instagramprofiltakip()


print(str(self.ui1.lnlinstagramkullaniciadi.text()))
print(self.ui1.lnlinstagramsifre.text())

It does not give me this data, google opens, but the data in the second application does not appear. where am i doing wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source