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. Cannot find the necessary pseudo state

Cannot find the necessary pseudo state

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 418 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.
  • BuccaneerB Offline
    BuccaneerB Offline
    Buccaneer
    wrote on last edited by
    #1

    Hello,
    I try to style my QTableWidget through StyleSheet
    I have already use:
    QTableView::item to set padding
    QTableView::item:enabled to set background only for enabled cells
    QTableView::item:focus to set background if cell is clicked

    If I clicked the cell it get background from QTableView::item:focus, and if the cell loses focus it get background from QTableView::item:enabled. Only two states.
    But in QTableWidget default style (if not use setStyleSheet) there is 3 states:
    1.default background for all cells
    2.selected background (when some cell selected)
    3. AND if the QTableWidget loses focus, the last selected cell (even the row) is still highlighted with grey color... -> So if the widget loses focus (or some child widget show on top) you still see in QTableWidget which cell was selected last
    The Question is:
    Which pseudo state can set Background for the cell that was selected last if QTableWidget loses focus?

    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