How to increase QTableWidget Vertical Scrollbar width?

前端 未结 2 1354
说谎
说谎 2021-01-13 20:38

I\'m having a QTableWidget with more than 5000 datas. Now i need to increase the width of vertical scrollbar associated with the QTableWidget. Can somebody help me?

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-13 21:03

    You can do that with a style sheet:

    myTableWidget->verticalScrollBar()->setStyleSheet(
        "QScrollBar:vertical { width: 100px; }");
    

    See also Customizing QScrollBar

提交回复
热议问题