Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mslib/msui/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def problem_in_map_sections(self):
key = "predefined_map_sections"
source_model = self.json_model
# set default color
color = QtCore.Qt.black
color = QtGui.QColor("black")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the pyqt version has not changed between py3.12 and py3.13

self.set_key_color(source_model, key, color)

data = source_model.serialize()
Expand Down
12 changes: 8 additions & 4 deletions mslib/support/qt_json_view/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DataType:
"""Base class for data types."""

# (mss)
COLOR = QtCore.Qt.black
COLOR = QtGui.QColor("black")

def matches(self, data):
"""Logic to define whether the given data matches this type."""
Expand Down Expand Up @@ -54,9 +54,13 @@ def key_item(self, key, model, datatype=None, editable=True):
"""Create an item for the key column for this data type."""
key_item = QtGui.QStandardItem(key)
key_item.setData(datatype, TypeRole)
key_item.setData(datatype.__class__.__name__, QtCore.Qt.ToolTipRole)
key_item.setData(
QtGui.QBrush(datatype.COLOR), QtCore.Qt.ForegroundRole)
if datatype:
key_item.setData(datatype.__class__.__name__, QtCore.Qt.ToolTipRole)
color = datatype.COLOR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

color is unused

else:
key_item.setData("None", QtCore.Qt.ToolTipRole)
color = QtGui.QColor("black")
key_item.setData(QtGui.QBrush(color), QtCore.Qt.ForegroundRole)
Copy link
Member

@ReimarBauer ReimarBauer Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting, looks similiar to Qt6 syntax. When was that changed?

from the pixi config we have in both setups the same pyqt.

key_item.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if editable and model.editable_keys:
Expand Down
Loading