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. Error setting qtablewidget style
Qt 6.11 is out! See what's new in the release blog

Error setting qtablewidget style

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 581 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.
  • T Offline
    T Offline
    training
    wrote on last edited by
    #1

    I set the header effect of qtablewidget on Linux. There is no way to set it here

    95a72411-214a-4554-9991-b5a5d3c99b6f-图片.png

    QTableView  QHeaderView::section
    {
        font-size:14px;
        font-family:"Microsoft YaHei";
        color:#FFFFFF;
        background:#60669B;
        border:none;
        text-align:left;
        min-height:49px;
        max-height:49px;
        margin-left:0px;
        padding-left:0px;
    }
    
    

    help me

    JonBJ 1 Reply Last reply
    0
    • T training

      I set the header effect of qtablewidget on Linux. There is no way to set it here

      95a72411-214a-4554-9991-b5a5d3c99b6f-图片.png

      QTableView  QHeaderView::section
      {
          font-size:14px;
          font-family:"Microsoft YaHei";
          color:#FFFFFF;
          background:#60669B;
          border:none;
          text-align:left;
          min-height:49px;
          max-height:49px;
          margin-left:0px;
          padding-left:0px;
      }
      
      

      help me

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @training
      From https://doc.qt.io/qt-5/stylesheet-reference.html

      The corner widget in a QTableView is implemented as a QAbstractButton and can be styled using the "QTableView QTableCornerButton::section" selector.

      https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtableview

      QTableView QTableCornerButton::section {
          background: red;
          border: 2px outset red;
      }
      
      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