qinvoke: Invoke a method

Description Usage Arguments Details Value Author(s) Examples

View source: R/invoke.R

Description

These functions invoke a method on an object or class. Usually, one does not call these functions directly but uses the $ short-cut, instead.

Usage

1
2
qinvoke(x, method, ...)
qinvokeStatic(x, method, ...)

Arguments

x

The object or class with the method

method

The name of the method

...

Arguments to pass to the method

Details

Perhaps the only reason to use one of these functions directly is in the context of functional iteration, e.g., when calling the same method on every object in a list with lapply.

Value

The return value of the method

Author(s)

Michael Lawrence

Examples

1
2
widgets <- replicate(length(letters), Qt$QWidget())
mapply(qinvoke, widgets, "setWindowTitle", letters)

qtbase documentation built on May 2, 2019, 9:58 a.m.