Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. QTableView::indicator doesn't work on Qt6.2 or Qt6.3
Qt 6.11 is out! See what's new in the release blog

QTableView::indicator doesn't work on Qt6.2 or Qt6.3

Scheduled Pinned Locked Moved Unsolved Qt 6
2 Posts 2 Posters 549 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
    Jimmy Jodi
    wrote on last edited by
    #1

    Hi,
    I want to show a QTableWidget on a custom dialog, so I do this for the dialog:
    this->setAttribute(Qt::WA_TranslucentBackground);//set background transparently
    this->setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog);//set frameless
    Then, I want to set StyleSheet for QTableWidget. The stylesheet is:
    QTableWidget::indicator {
    border: none;
    margin-left: 40px;
    margin-top: 1px;
    width: 35px;
    height: 34px;
    }
    QTableWidget::indicator:unchecked {
    image: url(':/task_unchecked.png');
    }
    QTableWidget::indicator:checked {
    image: url(':/task_checked.png');
    }
    On Qt5.x, the stylesheet works well.
    On Qt6.2, the stylesheet dosen't work. The indicator is still origin style, and doesn't load image.
    On Qt6.3, the stylesheet works incorrectly. Both the origin indicator and loaded image show in the table cell. If I disable "this->setAttribute(Qt::WA_TranslucentBackground);", it works well.
    Many thanks.
    Jimmy

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Please provide a minimal compilable example that shows that issue.

      You should also check the bug report system. If memory serves well, there has been some issues related to stylesheets.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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