You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
704 B

6 months ago
import Color_tracking
6 months ago
import Area_tracking
import sys
from PyQt6.QtWidgets import QApplication, QWidget, QPushButton
def quit_app():
sys.exit(app.quit())
def main1():
6 months ago
Color_tracking.main()
6 months ago
def main2():
6 months ago
Area_tracking.main()
6 months ago
app = QApplication(sys.argv)
widget = QWidget()
widget.resize(300, 200)
button1 = QPushButton('自选单颜色追踪', widget)
button1.move(50, 50)
button1.clicked.connect(Color_tracking.main)
button2 = QPushButton('自选区域颜色追踪', widget)
button2.move(50, 100)
button2.clicked.connect(Area_tracking.main)
quit_button = QPushButton('退出', widget)
6 months ago
quit_button.move(200, 50)
6 months ago
quit_button.clicked.connect(quit_app)
widget.show()
sys.exit(app.exec())