提交 a795b571 编写于 作者: 之一Yo's avatar 之一Yo

修复表格视图单击已选中区域没有更新选中状态的问题

上级 284f8730
......@@ -189,14 +189,14 @@ class TableBase:
self.setPressedRow(self.indexAt(e.pos()).row())
def mouseReleaseEvent(self, e):
QTableView.mouseReleaseEvent(self, e)
row = self.indexAt(e.pos()).row()
if row >= 0 and e.button() != Qt.RightButton:
self.setSelectedRows(self.selectedIndexes())
else:
self.setPressedRow(-1)
return QTableView.mouseReleaseEvent(self, e)
class TableWidget(QTableWidget, TableBase):
""" Table widget """
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册