parent
71ed9b8b50
commit
e59377dcee
@ -1,3 +1,34 @@
|
||||
import Color_tracking
|
||||
import PyQt6
|
||||
Color_tracking.main()
|
||||
import Area_tracking
|
||||
import sys
|
||||
from PyQt6.QtWidgets import QApplication, QWidget, QPushButton
|
||||
|
||||
def quit_app():
|
||||
sys.exit(app.quit())
|
||||
|
||||
def main1():
|
||||
print("main1 function called")
|
||||
|
||||
def main2():
|
||||
print("main2 function called")
|
||||
|
||||
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)
|
||||
quit_button.move(150, 50)
|
||||
quit_button.clicked.connect(quit_app)
|
||||
|
||||
widget.show()
|
||||
|
||||
sys.exit(app.exec())
|
||||
|
Loading…
Reference in new issue