Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您能否告诉我 QTreeView 类如何通过编码更改垂直滚动条样式(形状和颜色等)?
谢谢。
您只需要为滚动条设置样式表,例如:
myQTreeView->verticalScrollBar()->setStyleSheet( "background-color: #EAF5FF;" "alternate-background-color: #D5EAFF;" );