0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 19:21:50 +02:00

fix: import pyqtRemoveInputHook only for pyqt distributions

This commit is contained in:
2024-06-12 12:35:03 +02:00
parent 74182bb142
commit 4e52550f67
2 changed files with 9 additions and 2 deletions

View File

@ -4,12 +4,17 @@ import platform
import sys
import termqt
from qtpy.QtCore import QSocketNotifier, Qt, pyqtRemoveInputHook
from qtpy.QtCore import QSocketNotifier, Qt
from qtpy.QtGui import QFont
from qtpy.QtWidgets import QApplication, QHBoxLayout, QScrollBar, QWidget
from termqt import Terminal
pyqtRemoveInputHook()
try:
from qtpy.QtCore import pyqtRemoveInputHook
pyqtRemoveInputHook()
except ImportError:
pass
if platform.system() in ["Linux", "Darwin"]:
terminal_cmd = os.environ["SHELL"]

View File

@ -25,6 +25,7 @@ dependencies = [
"pyqtdarktheme",
"black", # needed for bw-generate-cli
"isort", # needed for bw-generate-cli
"termqt @ git+ssh://git@github.com:TerryGeng/termqt.git"
]
@ -36,6 +37,7 @@ dev = [
"pytest-xvfb",
"coverage",
"pytest-qt",
"isort",
"fakeredis",
]
pyqt5 = ["PyQt5>=5.9", "PyQtWebEngine>=5.9"]