I have problem with my code in Python 3.8 (PyQT5). I want to make simple print after button will be clicked, but nothing happens.
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QApplication, QDialog
from PyQt5.uic.properties import QtCore
from FutureMeMailSender import Ui_FutureMeMail
class FutureMeMail(QtWidgets.QMainWindow, MailSender):
def __init__(self):
super(FutureMeMail, self).__init__()
# Set up the user interface from Designer.
self.ui.pushButtonSendMail.clicked.connect(self.clicked)
self.receiver_mail = self.ui.lineEditMail.text()
self.ui = Ui_FutureMeMail()
self.ui.setupUi(self)
self.show()
def clicked(self):
print("PushButtonAction -- Hello")
if __name__ == "__main__":
app = QApplication(sys.argv)
window = QDialog()
ui = Ui_FutureMeMail()
ui.setupUi(window)
window.show()
sys.exit(app.exec_())