Exemple #1
0
 def __init__(self, parent: QWidget, mw: AnkiQt, on_close: Callable[[], None]):
     super().__init__(None, Qt.Window)
     self._open = True
     self._parent = parent
     self._close_callback = on_close
     self.mw = mw
     icon = QIcon()
     icon.addPixmap(QPixmap(":/icons/anki.png"), QIcon.Normal, QIcon.Off)
     self.setWindowIcon(icon)
Exemple #2
0
 def __init__(self, parent: QWidget, mw: AnkiQt,
              on_close: Callable[[], None]) -> None:
     super().__init__(None, Qt.Window)
     mw.garbage_collect_on_dialog_finish(self)
     self._open = True
     self._parent = parent
     self._close_callback = on_close
     self.mw = mw
     icon = QIcon()
     icon.addPixmap(QPixmap(":/icons/anki.png"), QIcon.Normal, QIcon.Off)
     disable_help_button(self)
     self.setWindowIcon(icon)
Exemple #3
0
 def get_icon(self, relative_path: str):
     icon = QIcon()
     icon.addPixmap(self.get_pixmap(relative_path))
     return icon