feat(safe_property): added decorator to handle errors in Property decorator...
Description
This merge request introduces a new SafeProperty
decorator for Qt properties, similar to the existing SafeSlot
. The SafeProperty
decorator ensures that exceptions in property setters do not propagate, preventing crashes in Qt Designer. It allows seamless error handling and includes an optional popup_error
argument to display error popups when exceptions occur.
Related Issues
None explicitly cited.
Type of Change
-
new
SafeProperty
qt decorator
Additional Comments
The SafeProperty
decorator mirrors the syntax and functionality of Qt's Property
but with added safety for use in Qt Designer. This ensures robust handling of property setters, especially in cases where invalid input might otherwise crash the Designer or application. The new functionality integrates directly into the existing utility module without altering any existing code or behavior.