Important: Please read the Qt Code of Conduct -

Set StyleSheen QTableView's Scroll bar.

  • 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");;
    QString styleSheet = QString::fromLatin1(file.readAll());
    QFile file2(":/qss/script_tvheader.qss");;
    styleSheet = QString::fromLatin1(file2.readAll());
    QHeaderView *headview = horizontalHeader();
    QFile file3(":/qss/script_tvScrollBar.qss");;
    styleSheet = QString::fromLatin1(file3.readAll());
    QScrollBar  *scrollbar = horizontalScrollBar();

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

Log in to reply