qtbase (version 1.1.0)

qinvoke: Invoke a method

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

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

Value

  • The return value of 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.

Examples

Run this code
widgets <- replicate(length(letters), Qt$QWidget())
mapply(qinvoke, widgets, "setWindowTitle", letters)

Run the code above in your browser using DataCamp Workspace