Skip to content

Cannot set background/foreground color of QStandardItem in QListView #118

@Tropaion

Description

@Tropaion

I have a QListView, where I try to change the color of some of the items, but sadly it doens't work the provided stylesheets.

item = self._list_data_model.item(index)

# Change color of item
item.setForeground(color)
item.setBackground(colo1)

How can I make it work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions