Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. ListView Highlight Question
Forum Updated to NodeBB v4.3 + New Features

ListView Highlight Question

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 2.3k 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.
  • B Offline
    B Offline
    bundickt
    wrote on last edited by
    #1

    I have a ListView where the delegate has a light blue background with white text and the highlight is a darker blue. When the ListView is in active focus the highlight has a red border. I am having issues with the way the highlight is being shown. It is drawn behind the ListView's items, so the only way to actually see it is to set the opacity of the delegate background to a number less than 1. I want to know if it possible to put the highlight above the items background, but below the white text of my item. I tried making the item not visible when it is the current item, but this looks bad during animation. Is it possible to define the Z depth of the highlight or is there any other solution for this?

    Thanks,
    Tom

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbrasser
      wrote on last edited by
      #2

      Hi,

      It's possible to put the highlight either above or below the delegate (by manipulating the z property), but unfortunately it isn't possible to put it "in the middle" (i.e. between layers within your delegate). This is due to the way z ordering currently works -- z is local between siblings, and the highlight is a sibling of the delegate. This use case is something we've discussed in the past, and hopefully we'll be able to provide a solution for a future release.

      Regards,
      Michael

      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