def _item_doubleclicked(self, widget):
"""An item in the table was clicked."""
column = widget.column()
row = widget.row()
if column == self.media_col:
# click in the media column, execute externally
msg = self._messages[row]
if msg.extfile_path is not None:
logger.debug("Opening external file %r", msg.extfile_path)
subprocess.call(['/usr/bin/xdg-open', msg.extfile_path])
elif column == self.text_col:
# click in the text column, copy to clipboard
clipboard = QtWidgets.QApplication.clipboard()
clipboard.setText(widget.text())
评论列表
文章目录