(image_path, root = root)
| 62 | #这里需要将tkImage设置为全局变量,不然显示不图片 |
| 63 | tkImage='' |
| 64 | def set_BackGround(image_path, root = root): |
| 65 | global tkImage |
| 66 | canvas = Canvas_(root) |
| 67 | img = cv2.imread(image_path) |
| 68 | tkImage = showImage(img) |
| 69 | canvas.create_image(0, 0, anchor='nw', image=tkImage) |
| 70 | |
| 71 | #关闭主界面时弹出的确认窗口 |
| 72 | def closeEvent(root): |
no test coverage detected