how to use signals and slots for qstring in qt
-
I have a
QString namethis value changes whenever the button is clicked. Now I want to call a functionupdate()whenever thenamevalue changes. -
I have a
QString namethis value changes whenever the button is clicked. Now I want to call a functionupdate()whenever thenamevalue changes.@Meera-Hadid please provide a minimal and verifiable example.
-
I have a
QString namethis value changes whenever the button is clicked. Now I want to call a functionupdate()whenever thenamevalue changes.@Meera-Hadid
As @eyllanesc says you need to be more specific. However you don't use signals/slots directly onQStrings, it sounds like you want them on the button click. -
I have a
QString namethis value changes whenever the button is clicked. Now I want to call a functionupdate()whenever thenamevalue changes.You can do something like emitting signals on your own
see more: https://doc.qt.io/qt-5/signalsandslots.html
Create a slot , as you saidupdate()
What causes the button text to change emit signal there ,
and it will execute things in slotAs others have said , a basic example is required for what you want