mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-03-05 00:12:49 +01:00
fix(widget_state_manager): omits QIcon properties to prevent segfault
This commit is contained in:
@@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
import shiboken6
|
||||
from bec_lib import bec_logger
|
||||
from qtpy.QtCore import QSettings
|
||||
from qtpy.QtGui import QIcon
|
||||
from qtpy.QtWidgets import (
|
||||
QApplication,
|
||||
QCheckBox,
|
||||
@@ -20,7 +21,7 @@ from bec_widgets.utils.widget_io import WidgetHierarchy
|
||||
|
||||
logger = bec_logger.logger
|
||||
|
||||
PROPERTY_TO_SKIP = ["palette", "font", "windowIcon", "windowIconText"]
|
||||
PROPERTY_TO_SKIP = ["palette", "font", "windowIcon", "windowIconText", "locale", "styleSheet"]
|
||||
|
||||
|
||||
class WidgetStateManager:
|
||||
@@ -126,7 +127,10 @@ class WidgetStateManager:
|
||||
continue
|
||||
|
||||
value = widget.property(name)
|
||||
if isinstance(value, QIcon):
|
||||
continue
|
||||
settings.setValue(name, value)
|
||||
|
||||
settings.endGroup()
|
||||
|
||||
# Recursively process children (only if they aren't skipped)
|
||||
|
||||
Reference in New Issue
Block a user