mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 13:40:27 +02:00
Fixed No Qt platform plugin could be initialized error
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
# 1.1.8 (pre-release)
|
||||||
|
- Fixed `No Qt platform plugin could be initialized` error, mentioned in #59 by @sunrainxyz
|
||||||
|
|
||||||
# 1.1.7
|
# 1.1.7
|
||||||
- Added MPS GPU acceleration support for Silicon Mac, mentioned in https://github.com/denizsafak/abogen/issues/32#issuecomment-3155902040 by @jefro108. **Please read the [Mac](https://github.com/denizsafak/abogen?tab=readme-ov-file#mac) section in the documentation again, as it requires additional configuration.**
|
- Added MPS GPU acceleration support for Silicon Mac, mentioned in https://github.com/denizsafak/abogen/issues/32#issuecomment-3155902040 by @jefro108. **Please read the [Mac](https://github.com/denizsafak/abogen?tab=readme-ov-file#mac) section in the documentation again, as it requires additional configuration.**
|
||||||
- Added word-by-word karaoke highlighting feature by @robmckinnon in PR #65
|
- Added word-by-word karaoke highlighting feature by @robmckinnon in PR #65
|
||||||
|
|||||||
@@ -4,6 +4,20 @@ import sys
|
|||||||
import platform
|
import platform
|
||||||
import atexit
|
import atexit
|
||||||
import signal
|
import signal
|
||||||
|
|
||||||
|
# Qt platform plugin detection (fixes #59)
|
||||||
|
try:
|
||||||
|
from PyQt5.QtCore import QLibraryInfo
|
||||||
|
plugins = QLibraryInfo.location(QLibraryInfo.PluginsPath)
|
||||||
|
platform_dir = os.path.join(plugins, "platforms")
|
||||||
|
if os.path.isdir(platform_dir):
|
||||||
|
os.environ["QT_QPA_PLATFORM_PLUGIN_PATH"] = platform_dir
|
||||||
|
print("QT_QPA_PLATFORM_PLUGIN_PATH set to:", platform_dir)
|
||||||
|
else:
|
||||||
|
print("PyQt5 platform plugins not found at", platform_dir)
|
||||||
|
except ImportError:
|
||||||
|
print("PyQt5 not installed.")
|
||||||
|
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
from PyQt5.QtGui import QIcon
|
from PyQt5.QtGui import QIcon
|
||||||
from PyQt5.QtCore import qInstallMessageHandler, QtMsgType
|
from PyQt5.QtCore import qInstallMessageHandler, QtMsgType
|
||||||
|
|||||||
Reference in New Issue
Block a user