mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
tidy up Qt import
This commit is contained in:
parent
e564a47504
commit
9876c30d89
1 changed files with 4 additions and 6 deletions
|
@ -7,8 +7,6 @@ import re
|
||||||
import time
|
import time
|
||||||
from typing import Any, Callable, List, Optional, Union
|
from typing import Any, Callable, List, Optional, Union
|
||||||
|
|
||||||
from PyQt5 import QtGui
|
|
||||||
|
|
||||||
from anki.cards import Card
|
from anki.cards import Card
|
||||||
from anki.lang import _
|
from anki.lang import _
|
||||||
from aqt import AnkiQt, gui_hooks
|
from aqt import AnkiQt, gui_hooks
|
||||||
|
@ -17,7 +15,9 @@ from aqt.qt import (
|
||||||
QCheckBox,
|
QCheckBox,
|
||||||
QDialog,
|
QDialog,
|
||||||
QDialogButtonBox,
|
QDialogButtonBox,
|
||||||
|
QIcon,
|
||||||
QKeySequence,
|
QKeySequence,
|
||||||
|
QPixmap,
|
||||||
Qt,
|
Qt,
|
||||||
QVBoxLayout,
|
QVBoxLayout,
|
||||||
QWidget,
|
QWidget,
|
||||||
|
@ -43,10 +43,8 @@ class Previewer(QDialog):
|
||||||
self._parent = parent
|
self._parent = parent
|
||||||
self._close_callback = on_close
|
self._close_callback = on_close
|
||||||
self.mw = mw
|
self.mw = mw
|
||||||
icon = QtGui.QIcon()
|
icon = QIcon()
|
||||||
icon.addPixmap(
|
icon.addPixmap(QPixmap(":/icons/anki.png"), QIcon.Normal, QIcon.Off)
|
||||||
QtGui.QPixmap(":/icons/anki.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off
|
|
||||||
)
|
|
||||||
self.setWindowIcon(icon)
|
self.setWindowIcon(icon)
|
||||||
|
|
||||||
def card(self) -> Optional[Card]:
|
def card(self) -> Optional[Card]:
|
||||||
|
|
Loading…
Reference in a new issue