def set_views(): root_view = _my_app.root_view set_button(root_view, 'add_button', lambda: add.show_add_dialog(_my_app, ADD_QML_DIR, ErrorDialog())) set_menu(root_view, 'change_notice_method', lambda: show_change_dialog(_my_app, CHANGE_QML_DIR)) set_menu(root_view, 'delete_noticer', lambda: del_noticer(root_view)) _my_app.web_view = root_view.findChild(QObject, 'web_view') root_view.sendClicked.connect(set_is_read) listview.load_noticers_listview(root_view)
def show_add_dialog(my_app, qml, error_dialog): add_dialog = MyView(qml) add_dialog.show() set_button(add_dialog.root_view, 'button', lambda: record_add_info(my_app, add_dialog, error_dialog))
def show_sign_dialog(my_app, qml): sign_dialog = MyView(qml) sign_dialog.show() set_button(sign_dialog.root_view, 'button', lambda: record_sign_info(my_app, sign_dialog.root_view, sign_dialog))