Esempio n. 1
0
 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)
Esempio n. 2
0
 def item_pressed(self, item):
     if QApplication.mouseButtons() & Qt.MouseButton.LeftButton:
         QTimer.singleShot(0, self.emit_navigate)
Esempio n. 3
0
 def pressed(self, index):
     if QApplication.mouseButtons() & Qt.MouseButton.LeftButton:
         self.activated(index)