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.