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