When setting up a Nextcloud account in KAccounts one gets up to three windows at a time. Ideally this would be a single window and integrated into the pagestack.
We need some way for the provider plugin to define a UI and push that into the KCM. I think for this purpose it's safe to assume that the UI will be QML-based. Widgets-based kaccounts UIs can still use the old way.
The QML-based KCMs do something similar. @mart Do you think that's an approach worth copying or do you regret writing that code?