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. [SOLVED] QAbstractItemView - removing "in-active" effect
QtWS25 Last Chance

[SOLVED] QAbstractItemView - removing "in-active" effect

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 508 Views
  • 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.
  • M Offline
    M Offline
    maximus
    wrote on last edited by
    #1

    I would like to have the same effect when a row is selected in my QAbstractItemView, wheter the item is active or not.

    By default, the item row selection appearance changes when the QAbstractItemView loose focus and I don't want that

    There seems to be two different states : "item:selected:active" and "item:selected:!active"
    I would like to have the same effect for both (best thing would be to remove the "!active" effect but I can't seems to do it. I could do this by pointing both state to the same Stylesheet, however, I would like to keep the "selected" appreance to the OS, not custom Qstylesheet, is there any way to ignore !active state ?

    Here is the result I have now :
    "https://www.dropbox.com/s/veg4adcwuqqvoly/leftMenuEx.png?dl=0":https://www.dropbox.com/s/veg4adcwuqqvoly/leftMenuEx.png?dl=0

    @QAbstractItemView::item:selected:active, QAbstractItemView::item:selected:!active {

    color:white;
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
    stop: 0 #ABAFE5, stop: 1 #8588B2);
    border: 1px solid black;
    ///Would like to keep OS specific selection, not custom color...
    }@

    Thanks!


    Free Indoor Cycling Software - https://maximumtrainer.com

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

      Hmm i'll do my own stylesheet for now, look and feel will not be platform specific but screw it..

      result:
      "https://www.dropbox.com/s/cq9tz3c827q2emn/result.png?dl=0":https://www.dropbox.com/s/cq9tz3c827q2emn/result.png?dl=0


      Free Indoor Cycling Software - https://maximumtrainer.com

      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