[Interest] QML: switch CheckBox back from tristate mode to binary mode?

René J.V. Bertin rjvbertin at gmail.com
Sat Feb 25 14:52:14 CET 2017


Hi,

Please bear with me if this is a newby question (I am, in QML)

I've been working on a plugin for a library that requires a user intervention before the plugin dialog's "Run" button is activated because the library assume there's always something like an authentication which has to be taken care of first.
There's no way to activate that button directly, and my plugin doesn't have any logical task that *has* to be performed before the actual work can be done. There is however a choice between 2 modes of operation, currently coupled to a checkbox.

My current solution is thus to initialise that checkbox with Qt.PartiallyChecked and display a concise instruction to select either of the modes. Once that initial choice has made the checkbox should ideally return to binary mode, but I have not been able to achieve that. Setting `partiallyCheckedEnabled: false` in the onCheckedChange callback does not have the expected effect.

Am I trying to do something that's impossible? Should I rather use a pair of radiobuttons anyway?

Thanks,
R.



More information about the Interest mailing list