Skip to content

Commit

Permalink
🐞 fix: 修复 WidgetBaseManager 的 checkbox 双击问题
Browse files Browse the repository at this point in the history
Signed-off-by: xqyjlj <xqyjlj@126.com>
  • Loading branch information
xqyjlj committed Feb 9, 2025
1 parent 343d56d commit e5b1746
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions widget/widget_base_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,14 @@ def editorEvent(
model: QAbstractItemModel,
option: QStyleOptionViewItem,
index: QModelIndex,
):
) -> bool:
column = index.column()
row = index.row()
if column == 1 and self.__data[row].typeof == "boolean":
if event.type() == QEvent.Type.MouseButtonRelease:
if (
event.type() == QEvent.Type.MouseButtonRelease
or event.type() == QEvent.Type.MouseButtonDblClick
):
event: QMouseEvent
if event.button() == Qt.MouseButton.LeftButton:
x = option.rect.x() + 15
Expand Down

0 comments on commit e5b1746

Please sign in to comment.