- ui->QTableView->verticalScrollBar()->setStyleSheet("QScrollBar:vertical{"
- "background:#FFFFFF;"
- "padding-top:20px;"
- "padding-bottom:20px;"
- "padding-left:3px;"
- "padding-right:3px;"
- "border-left:1px solid #d7d7d7;}"
- "QScrollBar::handle:vertical{"
- "background:#dbdbdb;"
- "border-radius:6px;"
- "min-height:80px;}"
- "QScrollBar::handle:vertical:hover{"
- "background:#d0d0d0;}"
- "QScrollBar::add-line:vertical{"
- "background:url(:/images/resource/images/checkout/down.png) center no-repeat;}"
- "QScrollBar::sub-line:vertical{"
- "background:url(:/images/resource/images/checkout/up.png) center no-repeat;}");
-
- ui->QTableView->horizontalScrollBar()->setStyleSheet("QScrollBar:horizontal{"
- "background:#FFFFFF;"
- "padding-top:3px;"
- "padding-bottom:3px;"
- "padding-left:20px;"
- "padding-right:20px;}"
- "QScrollBar::handle:horizontal{"
- "background:#dbdbdb;"
- "border-radius:6px;"
- "min-width:80px;}"
- "QScrollBar::handle:horizontal:hover{"
- "background:#d0d0d0;}"
- "QScrollBar::add-line:horizontal{"
- "background:url(:/images/resource/images/checkout/right.png) center no-repeat;}"
- "QScrollBar::sub-line:horizontal{"
- "background:url(:/images/resource/images/checkout/left.png) center no-repeat;}");
http://blog.csdn.net/shihoongbo/article/details/48970515ip