Qt World Summit: Submit your Presentation


[Solved] Toggle Button Text



  • 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.

    Tips?


  • Lifetime Qt Champion

    Hi,

    Add a slot reacting on the click event and test the current button text, change it accordingly and you're done.


Log in to reply