def item_clicked(self, item): if QApplication.mouseButtons() & Qt.MouseButton.RightButton: theme = item.data(Qt.ItemDataRole.UserRole) or {} url = theme.get('url') if url: safe_open_url(url) else: error_dialog(self, _('No homepage'), _('The {} theme has no homepage').format( theme.get('name', _('Unknown'))), show=True)
def item_pressed(self, item): if QApplication.mouseButtons() & Qt.MouseButton.LeftButton: QTimer.singleShot(0, self.emit_navigate)
def pressed(self, index): if QApplication.mouseButtons() & Qt.MouseButton.LeftButton: self.activated(index)