Qt World Summit: Register Today!

Questions Regarding Default Button

  • I am implementing a function in my API that uses setDefault() to, first, change an existing default button by using setDefault(false). Then I use the setDefault(true) command on another button to set that button as the default. Is unsetting the original default button necessary, or does setting another button as the default automatically unset the previous default button?

  • This is from QT documentatio:
    In a dialog, only one push button at a time can be the default button. This button is then displayed with an additional frame (depending on the GUI style).

    I guess you dont have to set the old one to default: false. 99% sure.

Log in to reply