mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
Add type annotations to eventFilter
This commit is contained in:
parent
c8aa72fa1c
commit
29d3156d3d
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from typing import Any
|
||||
|
||||
if sys.version_info[0] < 3 or sys.version_info[1] < 9:
|
||||
raise Exception("Anki requires Python 3.9+")
|
||||
|
@ -344,7 +345,7 @@ class AnkiApp(QApplication):
|
|||
# Global cursor: pointer for Qt buttons
|
||||
##################################################
|
||||
|
||||
def eventFilter(self, src, evt):
|
||||
def eventFilter(self, src: Any, evt: QEvent) -> bool:
|
||||
if evt.type() == QEvent.Type.HoverEnter:
|
||||
if type(src) == QPushButton:
|
||||
# TODO: apply drop-shadow with setGraphicsEffect(QGraphicsDropShadowEffect)
|
||||
|
|
Loading…
Reference in a new issue