def mousePressEvent(self, e): index = self.indexAt(e.pos()) if index.isValid(): item = self.itemAt(e.pos()) if e.button() == Qt.RightButton: self.menu.popup(QCursor.pos()) QTableWidget.mousePressEvent(self, e)
def mousePressEvent(self, e): QTableWidget.mousePressEvent(self.tableWidget, e) # в начале правильная обработка if e.button() == Qt.LeftButton: self.contacts = ContactsWindowPresenter(self) self.contacts.show()
def mousePressEvent(self, e): QTableWidget.mousePressEvent(self, e)