[Python] Qt6 QListView - how to set the colour of the current item bar?

Discussão em 'Python' iniciado por Stack, Maio 16, 2025.

  1. Stack

    Stack Membro Participativo

    Recently made the change from PyQt5 to PyQt6, and one of the side-effects is that PyQt6 honors the windows theme - as I use dark theme, its meant that its changed the colours of the objects on my app.

    While not a problem, one thing I've noticed is that the QListView has a black background, and white text, however, the currently selected item is only highlighted with a thin blue line on the left, and very dark grey background - bottom line, its very difficult to see at a glance which is the currently selected item (my app is a songbook program that I use on stage) - see the screenshot below:

    [​IMG]

    What I'd like to know is how can I change the background colour of the current item?

    Hope that makes sense...

    Many thanks Carl

    Continue reading...

Compartilhe esta Página