|
3 | 3 | import os
|
4 | 4 | import tempfile
|
5 | 5 | from PyQt5 import QtCore, QtGui
|
6 |
| -from PyQt5.QtCore import QObject, Qt, pyqtSlot, pyqtSignal, QThread |
| 6 | +from PyQt5.QtCore import Qt, pyqtSlot, pyqtSignal, QThread |
7 | 7 | from PyQt5.QtWebEngineWidgets import QWebEngineView
|
8 | 8 | from PyQt5.QtGui import QKeySequence
|
9 | 9 | from PyQt5.QtWidgets import QMainWindow, QApplication, QMessageBox, QVBoxLayout, QWidget, QShortcut,\
|
10 |
| - QPushButton, QTextEdit, QLineEdit, QFormLayout, QHBoxLayout, QCheckBox, QSpinBox, QDoubleSpinBox |
| 10 | + QPushButton, QTextEdit, QFormLayout, QHBoxLayout, QDoubleSpinBox |
11 | 11 | from pix2tex.resources import resources
|
12 | 12 | from pynput.mouse import Controller
|
13 | 13 |
|
@@ -108,7 +108,7 @@ def toggleProcessing(self, value=None):
|
108 | 108 | self.snipButton.setText(text)
|
109 | 109 | self.snipButton.clicked.disconnect()
|
110 | 110 | self.snipButton.clicked.connect(func)
|
111 |
| - self.displayPrediction() |
| 111 | + self.displayPrediction() |
112 | 112 |
|
113 | 113 | @pyqtSlot()
|
114 | 114 | def onClick(self):
|
@@ -306,6 +306,8 @@ def mouseReleaseEvent(self, event):
|
306 | 306 |
|
307 | 307 | def main(arguments):
|
308 | 308 | with in_model_path():
|
| 309 | + if os.name != 'nt': |
| 310 | + os.environ['QTWEBENGINE_DISABLE_SANDBOX'] = '1' |
309 | 311 | app = QApplication(sys.argv)
|
310 | 312 | ex = App(arguments)
|
311 |
| - sys.exit(app.exec_()) |
| 313 | + sys.exit(app.exec()) |
0 commit comments