Made import use PySimpleGUI instead of web, removed the shortcut from menus for easier reading

This commit is contained in:
PySimpleGUI 2020-04-06 14:59:23 -04:00
parent 0c9b691780
commit f7f3fc915a
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import cv2, PySimpleGUIWeb as sg
import cv2, PySimpleGUI as sg
window, cap = sg.Window('Demo Application - OpenCV Integration', [[sg.Image(filename='', key='image')], ], location=(800, 400)), cv2.VideoCapture(0)
while window(timeout=20)[0] is not None:
window['image'](data=cv2.imencode('.png', cap.read()[1])[1].tobytes())

View File

@ -71,7 +71,8 @@ def create_settings_window(settings):
def create_main_window(settings):
sg.theme(settings['theme'])
layout = [[sg.Menu([['&File', []], ['&Edit', ['&Settings'], ],['&Help', '&About...'],])],
layout = [
[sg.Menu([['File', ['Open']], ['Edit', ['Settings'], ],['Help', 'About...'],])],
[sg.T('This is my main application')],
[sg.T('Add your primary window stuff in here')],
[sg.B('Ok'), sg.B('Exit'), sg.B('Change Settings')]]