Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to get rid of the light blue background from "current" item?
Qt 6.11 is out! See what's new in the release blog

How to get rid of the light blue background from "current" item?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 300 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joachim W
    wrote on last edited by
    #1

    In a QListView, one item has "current" status. This status is poorly documented. It somehow differs from the "selected" property, and cannot be suppressed by setSelectionMode(QAbstractItemView::NoSelection).

    This "current" status is annoying because it shows up in a light blue background that overrides my own BackgroundRole settings in my model's data function (or produces some mixed color).

    How to

    • either disable the "current" status altogether,

    • or prevent it from showing up as a background color?

    The light blue background disappears if the application looses focus; therefore I see no way to capture it in a screen copy.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      CPPUIX
      wrote on last edited by
      #2

      Hi,

      This question on Stack Overflow might help:

      • How to change QComboBox's first item style when there is no selection
      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved