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. Set StyleSheen QTableView's Scroll bar.

Set StyleSheen QTableView's Scroll bar.

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 608 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.
  • S Offline
    S Offline
    Sriep
    wrote on last edited by Sriep
    #1

    How do I set the style sheet for the Scroll bar for QTableView.
    I tried the code below. It works for the setting the style sheet
    for QHeaderView but QScrollBar does not seem to work.

    In function from QHeaderView derived class.

    QFile file(":/qss/script_tableview.qss");
    file.open(QFile::ReadOnly);
    QString styleSheet = QString::fromLatin1(file.readAll());
    setStyleSheet(styleSheet);
    
    QFile file2(":/qss/script_tvheader.qss");
    file2.open(QFile::ReadOnly);
    styleSheet = QString::fromLatin1(file2.readAll());
    QHeaderView *headview = horizontalHeader();
    headview->setStyleSheet(styleSheet);
    
    QFile file3(":/qss/script_tvScrollBar.qss");
    file3.open(QFile::ReadOnly);
    styleSheet = QString::fromLatin1(file3.readAll());
    QScrollBar  *scrollbar = horizontalScrollBar();
    scrollbar->setStyleSheet(styleSheet);
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sriep
      wrote on last edited by
      #2

      Ops So sorry I am getting horizontal vertical blindness. Please ignore.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved