Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] Toggle Button Text
Ccmc last edited by
Suppose I'm making a push button that can switch back and forth between two states, say "Celsius" and "Fahrenheit". Simply setCheckable() does not do the trick. I don't even want the button to remain lowered/"on" at any time; I just want the text to change.
Add a slot reacting on the click event and test the current button text, change it accordingly and you're done.