diff --git a/Demo/FacePoints.py b/Demo/FacePoints.py index 7ebea2b..9df0060 100644 --- a/Demo/FacePoints.py +++ b/Demo/FacePoints.py @@ -163,7 +163,7 @@ class OpencvWidget(QLabel): if __name__ == "__main__": - sys.excepthook = cgitb.enable(1, None, 5, '') + cgitb.enable(1, None, 5, '') app = QApplication(sys.argv) w = OpencvWidget() w.show() diff --git a/Demo/GifCursor.py b/Demo/GifCursor.py index 3aee0cf..61be6f5 100644 --- a/Demo/GifCursor.py +++ b/Demo/GifCursor.py @@ -38,7 +38,7 @@ class Window(QWidget, QCursorGif): if __name__ == '__main__': import sys import cgitb - sys.excepthook = cgitb.enable(1, None, 5, '') + cgitb.enable(1, None, 5, '') from PyQt5.QtWidgets import QApplication app = QApplication(sys.argv) w = Window() diff --git a/QListView/SortItemByRole.py b/QListView/SortItemByRole.py index 269bd6f..b0a963e 100644 --- a/QListView/SortItemByRole.py +++ b/QListView/SortItemByRole.py @@ -141,7 +141,7 @@ class Window(QWidget): if __name__ == '__main__': import sys import cgitb - sys.excepthook = cgitb.enable(1, None, 5, '') + cgitb.enable(1, None, 5, '') from PyQt5.QtWidgets import QApplication app = QApplication(sys.argv) w = Window() diff --git a/QListWidget/DeleteCustomItem.py b/QListWidget/DeleteCustomItem.py index a2d4933..73c972e 100644 --- a/QListWidget/DeleteCustomItem.py +++ b/QListWidget/DeleteCustomItem.py @@ -91,7 +91,7 @@ class Window(QWidget): if __name__ == '__main__': import sys import cgitb - sys.excepthook = cgitb.enable(1, None, 5, 'text') + cgitb.enable(1, None, 5, '') from PyQt5.QtWidgets import QApplication app = QApplication(sys.argv) w = Window() diff --git a/QListWidget/FoldWidget.py b/QListWidget/FoldWidget.py index d522c95..ac383b4 100644 --- a/QListWidget/FoldWidget.py +++ b/QListWidget/FoldWidget.py @@ -79,7 +79,7 @@ class Window(QListWidget): if __name__ == '__main__': import sys import cgitb - sys.excepthook = cgitb.enable(1, None, 5, '') + cgitb.enable(1, None, 5, '') from PyQt5.QtWidgets import QApplication app = QApplication(sys.argv) # 通过qss改变按钮的高度 diff --git a/QMenu/MultiSelect.py b/QMenu/MultiSelect.py index 17bf9bd..1708d22 100644 --- a/QMenu/MultiSelect.py +++ b/QMenu/MultiSelect.py @@ -70,7 +70,7 @@ class Window(QWidget): if __name__ == '__main__': import sys import cgitb - sys.excepthook = cgitb.enable(1, None, 5, 'text') + cgitb.enable(1, None, 5, '') from PyQt5.QtWidgets import QApplication app = QApplication(sys.argv) w = Window() diff --git a/QPropertyAnimation/RlatticeEffect.py b/QPropertyAnimation/RlatticeEffect.py index 7c44337..e91e215 100644 --- a/QPropertyAnimation/RlatticeEffect.py +++ b/QPropertyAnimation/RlatticeEffect.py @@ -220,7 +220,7 @@ class Window(QWidget): if __name__ == '__main__': import sys import cgitb - sys.excepthook = cgitb.enable(1, None, 5, '') + cgitb.enable(1, None, 5, '') from PyQt5.QtWidgets import QApplication app = QApplication(sys.argv) w = Window() diff --git a/QSerialPort/SerialDebugAssistant.py b/QSerialPort/SerialDebugAssistant.py index 0f87638..a3869a2 100644 --- a/QSerialPort/SerialDebugAssistant.py +++ b/QSerialPort/SerialDebugAssistant.py @@ -139,7 +139,7 @@ class Window(QWidget, Ui_FormSerialPort): if __name__ == '__main__': import sys import cgitb - sys.excepthook = cgitb.enable(1, None, 5, '') + cgitb.enable(1, None, 5, '') from PyQt5.QtWidgets import QApplication app = QApplication(sys.argv) w = Window() diff --git a/QSlider/ClickJumpSlider.py b/QSlider/ClickJumpSlider.py index 3e7f00a..ecab9ef 100644 --- a/QSlider/ClickJumpSlider.py +++ b/QSlider/ClickJumpSlider.py @@ -78,7 +78,7 @@ class DemoWindow(QWidget): if __name__ == '__main__': import sys import cgitb - sys.excepthook = cgitb.enable(1, None, 5, '') + cgitb.enable(1, None, 5, '') from PyQt5.QtWidgets import QApplication app = QApplication(sys.argv) w = DemoWindow() diff --git a/QThread/WakeupThread.py b/QThread/WakeupThread.py index 2f11a80..66c299f 100644 --- a/QThread/WakeupThread.py +++ b/QThread/WakeupThread.py @@ -75,7 +75,7 @@ class Window(QWidget): if __name__ == '__main__': import sys import cgitb - sys.excepthook = cgitb.enable(1, None, 5, '') + cgitb.enable(1, None, 5, '') from PyQt5.QtWidgets import QApplication app = QApplication(sys.argv) w = Window() diff --git a/QWebEngineView/ScreenShotPage.py b/QWebEngineView/ScreenShotPage.py index ad82821..cf117b2 100644 --- a/QWebEngineView/ScreenShotPage.py +++ b/QWebEngineView/ScreenShotPage.py @@ -185,7 +185,7 @@ if __name__ == "__main__": # 开启F12 控制台功能,需要单独通过浏览器打开这个页面 # 这里可以做个保护, 发布软件,启动时把这个环境变量删掉。防止他人通过环境变量开启 os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = '9966' - sys.excepthook = cgitb.enable(1, None, 5, '') + cgitb.enable(1, None, 5, '') app = QApplication(sys.argv) w = Window() w.show() diff --git a/QWebView/GetCookie.py b/QWebView/GetCookie.py index 090b4f6..5514103 100644 --- a/QWebView/GetCookie.py +++ b/QWebView/GetCookie.py @@ -68,7 +68,7 @@ class WebView(QWebView): if __name__ == "__main__": - sys.excepthook = cgitb.enable(1, None, 5, '') + cgitb.enable(1, None, 5, '') app = QApplication(sys.argv) w = WebView() w.show() diff --git a/QWebView/ScreenShotPage.py b/QWebView/ScreenShotPage.py index 5569a54..aeec283 100644 --- a/QWebView/ScreenShotPage.py +++ b/QWebView/ScreenShotPage.py @@ -165,7 +165,7 @@ class Window(QWidget): if __name__ == "__main__": - sys.excepthook = cgitb.enable(1, None, 5, '') + cgitb.enable(1, None, 5, '') app = QApplication(sys.argv) w = Window() w.show() diff --git a/Test/Network/窗口配合异步Http/窗口配合异步Http.py b/Test/Network/窗口配合异步Http/窗口配合异步Http.py index 4885b42..3c47cdd 100644 --- a/Test/Network/窗口配合异步Http/窗口配合异步Http.py +++ b/Test/Network/窗口配合异步Http/窗口配合异步Http.py @@ -132,7 +132,7 @@ if __name__ == '__main__': import cgitb import os os.makedirs('tmp', exist_ok=True) - sys.excepthook = cgitb.enable(1, None, 5, 'text') + cgitb.enable(1, None, 5, '') app = QApplication(sys.argv) loop = QEventLoop(app) asyncio.set_event_loop(loop)