from PyQt5.QtWidgets import QMainWindow, QApplication
from PyQt5 import uic, QtCore, Qt
import threading
from Inicio import *
class Principal(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
uic.loadUi("C:/Users/Angel/Desktop/N_Proyect/Interfaces/Login.ui",self)
self.b_login.clicked.connect(lambda:Dato())
self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
self.setAttribute(QtCore.Qt.WA_TranslucentBackground,True)
self.setAttribute(QtCore.Qt.WA_NoSystemBackground,False)
self.closed.clicked.connect(lambda:self.close())
t = threading.Thread(target=self.mostrar_hora)
t.start()
self.timer = QtCore.QTimer(self)
self.timer.setInterval(1000)
self.timer.timeout.connect(self.mostrar_hora)
self.timer.start()
def mostrar_hora(self):
self.hora.setText(QtCore.QDateTime.currentDateTime().toString("hh:mm:ss AP"))
class Dato:
def __init__(self):
self.principal = Principal()
self.inicio = Inicio()
self.inicio.show()
self.inicio.user.setText('k')
print(self.principal.l_usuario.text())
app = QApplication([])
p = Principal()
p.show()
app.exec_()
I am trying to send the value of the edit qline of the login module to the label that is in the start module, I do all this in the data class but it does not change the value.