Skip to content

Commit

Permalink
Improve error message if qt binding could not be found (#205)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Larson <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 2, 2023
1 parent cd6a069 commit 573910d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion mne_qt_browser/_pg_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,20 @@
from os.path import getsize

import numpy as np

try:
from qtpy.QtCore import Qt
except Exception as exc:
if exc.__class__.__name__ == "QtBindingsNotFoundError":
raise ImportError(
"No Qt binding found, please install PyQt6, PyQt5, PySide6, or PySide2"
) from None
else:
raise

from qtpy.QtCore import (
QEvent,
QThread,
Qt,
Signal,
QRectF,
QLineF,
Expand Down

0 comments on commit 573910d

Please sign in to comment.