Skip to content
Advertisement

How to emit signal when the label text change?

I have 3 forms (main form, password form and menu form). The user clicks menu to open menu form, but before the menu form shows, the password form display to authenticate the user. He could display RFID card or enter his Id and password.

When he puts his card the socket notifier in main form recieved the RFID card data and it send to active form (my active form is password form). So the main form send card data to lblrfid:

JavaScript

in password form I have a slot to authenticate the RFID card data and open menu form if the card is valid.

JavaScript

I want to call AcceptCard after the label text changed.
How can I do that?

Advertisement

Answer

Provided code is not the best variant of using forms…

I think password form is created in main from code? Am I correct?

Here is an example of better code (not the best of cource):

Code can contain errors! Have no ability to check it now!

mainwindow.h

JavaScript

mainwindow.cpp

JavaScript

mydialog.h

JavaScript

mydialog.cpp

JavaScript

EDIT

You can cast f to MyDialog

JavaScript
Advertisement