D
D
Dj Colli2022-02-08 10:06:41
User interface
Dj Colli, 2022-02-08 10:06:41

How to implement a label click event in pyqt5?

Hello. Today I made an application that, at the beginning of the program, asks the user for a password (in a separate window), and when the button is pressed, it throws it further (if the login and password are correct). I placed the inscription (Registration) under the button, made it look like a link and started writing the code.
6202165a18aa5236458180.png
I wanted an event to be processed when I clicked on the inscription (a new window was opened for registration), but when I registered it self.registerButton.clicked.connect(self.register), I saw an errordef __init__():

AttributeError: 'QLabel' object has no attribute 'clicked'

Which event is responsible for clicking on the inscription or for clicking in general?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question