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. How to style the table header include the dotted line
Forum Updated to NodeBB v4.3 + New Features

How to style the table header include the dotted line

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 4.2k 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.
  • D Offline
    D Offline
    Davidcheng
    wrote on last edited by Davidcheng
    #1

    im new to Qt, dont know how to disable the table header grid and show the dotted line (similar to below image)
    0_1511620624107_1_ALARM-HISTORY.png

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

      Hi and welcome
      alt text

      http://doc.qt.io/qt-5/stylesheet-reference.html

      Need tons of fiddling though :)

      alt text

      closest i could get with

      QHeaderView::section {   
          color: black;
         background-color:  rgb(229, 229, 229);
          border-width: 0px 0px 2px 0px;
          border-style: dotted;
          border-color: black;
      }
      
      QTableWidget { 
        background-color:  rgb(229, 229, 229);
        gridline-color:  rgb(229, 229, 229);
        border-style: none;
      }
      
      QTableWidget QTableCornerButton::section {
          background-color:  rgb(229, 229, 229);
      }
      
      
      D 1 Reply Last reply
      2
      • mrjjM mrjj

        Hi and welcome
        alt text

        http://doc.qt.io/qt-5/stylesheet-reference.html

        Need tons of fiddling though :)

        alt text

        closest i could get with

        QHeaderView::section {   
            color: black;
           background-color:  rgb(229, 229, 229);
            border-width: 0px 0px 2px 0px;
            border-style: dotted;
            border-color: black;
        }
        
        QTableWidget { 
          background-color:  rgb(229, 229, 229);
          gridline-color:  rgb(229, 229, 229);
          border-style: none;
        }
        
        QTableWidget QTableCornerButton::section {
            background-color:  rgb(229, 229, 229);
        }
        
        
        D Offline
        D Offline
        Davidcheng
        wrote on last edited by
        #3

        @mrjj thanks a lot!

        mrjjM 1 Reply Last reply
        0
        • D Davidcheng

          @mrjj thanks a lot!

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Davidcheng
          Np. :)
          Sadly it seems it dont support
          border-radius: 24px;
          so i think it cant have round corners though.

          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