'Remove or rename QML Settings category?

I have PySide6/QML app where I dynamically create components and add these to a StackView. Each of these has its own Settings object and they only differ by their category, which functions like an identifier for each component and is initially typed in by the user. All these are saved to the same file. I need a way to be able to delete the settings from the settings file when a component is deleted and also to be able to rename the categories if I need to. I'm not sure how to go about it as the functionality of the Settings module in QML seems to be quite limited.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source