Skip to content

Commit 1b48858

Browse files
committed
2 parents 5f35898 + fb70ef8 commit 1b48858

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pix2tex/gui.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import os
44
import tempfile
55
from PyQt5 import QtCore, QtGui
6-
from PyQt5.QtCore import QObject, Qt, pyqtSlot, pyqtSignal, QThread
6+
from PyQt5.QtCore import Qt, pyqtSlot, pyqtSignal, QThread
77
from PyQt5.QtWebEngineWidgets import QWebEngineView
88
from PyQt5.QtGui import QKeySequence
99
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
1111
from pix2tex.resources import resources
1212
from pynput.mouse import Controller
1313

@@ -108,7 +108,7 @@ def toggleProcessing(self, value=None):
108108
self.snipButton.setText(text)
109109
self.snipButton.clicked.disconnect()
110110
self.snipButton.clicked.connect(func)
111-
self.displayPrediction()
111+
self.displayPrediction()
112112

113113
@pyqtSlot()
114114
def onClick(self):
@@ -306,6 +306,8 @@ def mouseReleaseEvent(self, event):
306306

307307
def main(arguments):
308308
with in_model_path():
309+
if os.name != 'nt':
310+
os.environ['QTWEBENGINE_DISABLE_SANDBOX'] = '1'
309311
app = QApplication(sys.argv)
310312
ex = App(arguments)
311-
sys.exit(app.exec_())
313+
sys.exit(app.exec())

0 commit comments

Comments
 (0)