How to hide vertical/horizontal lines in QTableWidget

て烟熏妆下的殇ゞ 提交于 2019-12-11 05:33:28

问题


I am using Pyqt4 for GUI programming in python. How can I hide vertical or horizontal lines in QTableWidget?


回答1:


Try:

yourTableWidget.setShowGrid(False)

Unfortunately there seems to be no good way to do this via Stylesheets. A workaround is to set gridline-color: the same as background-color:.

If you want to disable just vertical or horizontal lines, turn the grid off in code, and draw the borders per item with the QTableView::item selector.



来源:https://stackoverflow.com/questions/22455445/how-to-hide-vertical-horizontal-lines-in-qtablewidget

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!