Skip to content

Commit

Permalink
등록화면에서 이름을 입력안할 시 경고메시지 출력
Browse files Browse the repository at this point in the history
  • Loading branch information
BHyeonKim committed May 28, 2023
1 parent 861d386 commit ac58bee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Binary file modified __pycache__/register.cpython-38.pyc
Binary file not shown.
9 changes: 8 additions & 1 deletion register.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QPushButton, QLineEdit, QLabel
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QPushButton, QLineEdit, QLabel, QMessageBox
from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtGui import QImage, QPixmap
import os
Expand Down Expand Up @@ -60,6 +60,13 @@ def register_face(self):

if label:
np.save(label + ".npy", embedding)
else:
msg = QMessageBox()
msg.setIcon(QMessageBox.Warning)
msg.setText("Error")
msg.setInformativeText('Please enter a name.')
msg.setWindowTitle("Error")
msg.exec_()

self.name_edit.clear()

Expand Down

0 comments on commit ac58bee

Please sign in to comment.