Skip to content

Commit

Permalink
Solved issue with double click on table
Browse files Browse the repository at this point in the history
  • Loading branch information
wooni005 committed Aug 7, 2020
1 parent 9119021 commit 95fb391
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def __init__(self, dataModel):
self.setSelectionBehavior(QTableView.SelectRows)

# Get an event when clicking on the table (row)
self.doubleClicked.connect(self.onTableClicked)
self.doubleClicked.connect(self.onTableDoubleClicked)
self.clicked.connect(self.onTableClicked)

# When double click a cell/row, don't go into edit mode
Expand All @@ -189,11 +189,11 @@ def keyPressEvent(self, event):

def onTableClicked(self, event):
self.selectedRow = event.row()
print(self.selectedRow)
# print("SingleClick:" + str(self.selectedRow))

def onTableDoubleClicked(self, event):
self.selectedRow = event.row()
print(self.selectedRow)
# print("DoubleClick:" + str(self.selectedRow))
url = self.dataModel.index(self.selectedRow, 5).data()
self.openFileWithDefaultApplication(url)

Expand Down

0 comments on commit 95fb391

Please sign in to comment.