summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x9kwpyqt.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/9kwpyqt.py b/9kwpyqt.py
index ed796de..307a771 100755
--- a/9kwpyqt.py
+++ b/9kwpyqt.py
@@ -3,7 +3,7 @@
import sys
import time
from PyQt5.QtCore import Qt, QTimer, QUrl, pyqtSignal
-from PyQt5.QtWidgets import QApplication, QWidget
+from PyQt5.QtWidgets import QApplication, QWidget, QCheckBox
from PyQt5.QtWidgets import QLayout, QHBoxLayout, QVBoxLayout, QSizePolicy
from PyQt5.QtWidgets import QLabel, QLineEdit, QPushButton, QProgressBar
from PyQt5.QtGui import QPixmap, QImage
@@ -93,9 +93,12 @@ class CaptchaGUI(QWidget):
self.captchaInputLine = QLineEdit()
self.startstopButton = QPushButton("Start")
self.startstopButton.setCheckable(True)
+ self.soundCheckbox = QCheckBox("Sound")
+ self.soundCheckbox.setChecked(True)
self.startstopButton.clicked.connect(self.toggleRunning)
self.LayoutSettings = QHBoxLayout()
+ self.LayoutSettings.addWidget(self.soundCheckbox)
self.LayoutSettings.addWidget(self.startstopButton)
self.LayoutSubmit = QVBoxLayout()
@@ -165,7 +168,8 @@ class CaptchaGUI(QWidget):
if result:
self.captchaImage.setImage(pixmap)
self.captchaInputLine.setFocus()
- self.sound.play()
+ if self.soundCheckbox.isChecked():
+ self.sound.play()
self.timer.start(30000)
self.captchaImage.setText("")
else: