widget ( QWidget) – the widget that will receive the event.Sends one or more keyboard events to a widget. Consult the documentation for moreīelow are methods used to simulate sending key events to widgets: static ke圜lick ( widget, key ] ) ¶ static ke圜licks ( widget, key_sequence ] ) ¶ static keyEvent ( action, widget, key ] ) ¶ static keyPress ( widget, key ] ) ¶ static keyRelease ( widget, key ] ) ¶ Those methods are just forwarded directly to the QTest API. Methods below provide very low level functions, as sending a single mouse click or a key event. This method is also available as wait_until (pep-8 alias) Signals = and actually emitted signals = works "simple": like “strict”, but signals may be emitted in-between the provided ones, e.g.fails when expecting signals and is emitted) "strict": signals have to be emitted strictly in the provided order.If the number of callbacks doesn’t match the number of signals ValueError will be raised.ĭetermines the order in which to expect signals: Instead of a specific callable, None can be provided, to disable parameter checking for the check_params_cbs ( list) – optional list of callables that compare the provided signal parameters to some expected parameters.Įach callable has to match the signature of the corresponding signal in signals (just like a slotįunction would) and return True if parameters match, False otherwise.This defaults to True unless qt_default_raising = false raising ( bool) – If qtbot.TimeoutError.timeout ( int) – How many milliseconds to wait before resuming control flow.(signal, signal_name_as_str) to improve the error message that is part of qtbot.TimeoutError. Alternatively: a list of ( Signal, str) tuples of the form signals ( list) – A list of Signal objects to wait for.waitSignals ( signals, timeout = 1000 ) long_function_that_calls_signal () blocker.
0 Comments
Leave a Reply. |