Qt Event Propagation in QWebEngineView
问题 I have a function named generate_input_event . I'm trying to use this function to simulate a keypress within a QWebEngineView. def generate_input_event(window_id, key_code, modifiers, low_level_data, x, y): modifiers_flag = create_modifiers_flag(modifiers) logging.info("generate input, window: {} code: {}, modifiers {}".format( window_id, key_code, modifiers_flag)) event = QKeyEvent(QEvent.KeyPress, key_code, modifiers_flag) event.artificial = True event_window = window.get_window(window_id)