Currently the QML KCM class in in kdeclarative and have different methods to express the state that the QWidgets one. In the KCModuleQml class (kcmutils) those from the QML KCM get mapped to the one of the QWidgets KCM. This causes the need for some ugly workarounds, like casting an enum value to an int and then to a different enum.
My idea would be to add a common base class for both QWidgets and QML KCMs which contains all the Properties/Methods/Signals needed. This would also make it easier to extend the KCMs without duplicating the effort.
But I am not sure where to best put this base class. The KCModule class is in KConfigWidgets, but the base class should just be a QObject and not a QWidget.