Description Usage Arguments Details Value Author(s) Examples
Like many other GUI toolkits, Qt supports connecting handler functions
to signals, which are emitted in response to user
actions. The qconnect
function connects an R function to a
signal on a Qt object.
1 | qconnect(x, signal, handler, user.data)
|
x |
The Qt object providing the signal |
signal |
The name of the signal |
handler |
The R function to handle the signal |
user.data |
Data to pass to the R function as the last parameter. If omitted, no such argument is passed to the handler. |
In Qt, only other QObject
instances can listen to a signal, so
this function creates a dummy object that invokes the R function upon
receipt of the signal.
To disconnect a handler, call the disconnect
method on the
signal emitter x
, passing it the returned dummy QObject
;
see the example.
A dummy QObject
instance that is listening to the signal. Will
become invalid when the signal emitter is invalidated.
Michael Lawrence
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.