Mods
This commit is contained in:
parent
4b8c6e52de
commit
6450af91be
|
@ -1,14 +1,15 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from PySide6.QtWidgets import QWidget
|
from PySide6.QtWidgets import QWidget # type: ignore
|
||||||
from PySide6.QtGui import QKeyEvent # type: ignore
|
from PySide6.QtGui import QKeyEvent # type: ignore
|
||||||
|
|
||||||
from .window import Window
|
from .window import Window
|
||||||
|
|
||||||
|
|
||||||
class Filter:
|
class Filter:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_value() -> str:
|
def get_value() -> str:
|
||||||
return Window.filter.text().lower().strip()
|
return str(Window.filter.text()).lower().strip()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def filter(event: QKeyEvent | None = None) -> None:
|
def filter(event: QKeyEvent | None = None) -> None:
|
||||||
|
@ -68,4 +69,4 @@ class Filter:
|
||||||
value = Filter.get_value()
|
value = Filter.get_value()
|
||||||
|
|
||||||
if value:
|
if value:
|
||||||
Filter.filter()
|
Filter.filter()
|
||||||
|
|
|
@ -8,7 +8,7 @@ from PySide6.QtWidgets import QHBoxLayout # type: ignore
|
||||||
from PySide6.QtWidgets import QVBoxLayout
|
from PySide6.QtWidgets import QVBoxLayout
|
||||||
from PySide6.QtWidgets import QLabel
|
from PySide6.QtWidgets import QLabel
|
||||||
from PySide6.QtWidgets import QWidget
|
from PySide6.QtWidgets import QWidget
|
||||||
from PySide6.QtGui import QPixmap
|
from PySide6.QtGui import QPixmap # type: ignore
|
||||||
from PySide6.QtCore import QTimer
|
from PySide6.QtCore import QTimer
|
||||||
|
|
||||||
from wonderwords import RandomSentence # type: ignore
|
from wonderwords import RandomSentence # type: ignore
|
||||||
|
|
Loading…
Reference in New Issue