mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect-gui.git
synced 2025-06-24 13:14:11 +08:00
fixed
This commit is contained in:
parent
74a090f320
commit
0a4c65de10
@ -74,7 +74,8 @@ class TaskResultFrame(QFrame):
|
|||||||
self.result_big_label.setPixmap(big_pixmap)
|
self.result_big_label.setPixmap(big_pixmap)
|
||||||
# self.view_label.setGeometry((self.view_widget.width() - self.view_label.width()) / 2, 0, self.view_label.width(), self.view_label.height())
|
# self.view_label.setGeometry((self.view_widget.width() - self.view_label.width()) / 2, 0, self.view_label.width(), self.view_label.height())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
dd = 0
|
print("广角摄像头有错误!")
|
||||||
|
|
||||||
elif msg.msg_type == MSG_DETECTION_RECORD:
|
elif msg.msg_type == MSG_DETECTION_RECORD:
|
||||||
# 显示日志
|
# 显示日志
|
||||||
# self.log_text.appendPlainText(get_msg_info(msg.record.code).decode('utf-8'))
|
# self.log_text.appendPlainText(get_msg_info(msg.record.code).decode('utf-8'))
|
||||||
@ -112,9 +113,9 @@ class TaskResultFrame(QFrame):
|
|||||||
# view_pixmap = QPixmap.fromImage(qt_image)
|
# view_pixmap = QPixmap.fromImage(qt_image)
|
||||||
# self.picture_label.setPixmap(view_pixmap)
|
# self.picture_label.setPixmap(view_pixmap)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
dd = 0
|
print("结果图片有错误!")
|
||||||
else:
|
else:
|
||||||
ddd = 0
|
print("任务结果错误!")
|
||||||
|
|
||||||
def init_ui(self):
|
def init_ui(self):
|
||||||
layout = QGridLayout()
|
layout = QGridLayout()
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import math
|
import math
|
||||||
|
|
||||||
|
from PyQt5.QtGui import QPixmap
|
||||||
from PyQt5.QtWidgets import QFrame, QWidget, QPushButton
|
from PyQt5.QtWidgets import QFrame, QWidget, QPushButton
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from exceptiongroup import catch
|
from exceptiongroup import catch
|
||||||
|
|
||||||
class TaskResultEmbedFrame(QFrame):
|
class TaskResultEmbedFrame(QWidget):
|
||||||
def __init__(self, task, parent=None):
|
def __init__(self, task, parent=None):
|
||||||
super(TaskResultEmbedFrame, self).__init__(parent)
|
super(TaskResultEmbedFrame, self).__init__(parent)
|
||||||
self.task = task
|
self.task = task
|
||||||
@ -27,6 +28,8 @@ class TaskResultEmbedFrame(QFrame):
|
|||||||
top = h - math.ceil(float(param["center"]) * 1000 / scale)
|
top = h - math.ceil(float(param["center"]) * 1000 / scale)
|
||||||
embed_button.move(left, top)
|
embed_button.move(left, top)
|
||||||
embed_button.setVisible(True)
|
embed_button.setVisible(True)
|
||||||
|
# p = self.grab()
|
||||||
|
# p.save("d:\\demo.bmp", "bmp")
|
||||||
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print("任务参数有错误!")
|
print("任务参数有错误!")
|
||||||
|
Loading…
Reference in New Issue
Block a user