Learn R Programming

qtbase (version 1.1.0)

RQtClass: Class Definitions

Description

Each class defined by a library has a corresponding RQtClass object. Each object is a function and serves as the constructor for the class. Special behavior is defined, so that the function also behaves as a container of static methods and enumeration values defined by the class.

Arguments

Details

Besides serving as a constructor, this object contains two types of members: static methods and enumeration values. Their names may be listed by calling names on the object. To access a member, use $, which supports auto-completion, thanks to the names method.

Namespaces within a library are also represented as RQtClass objects, even though they are not actually classes.

See Also

RQtLibrary (container of class objects), RQtObject (an instance of a class)

Examples

Run this code
## calling a constructor
widget <- Qt$QWidget()
## calling a static method
Qt$QWidget$tr("hello world")
## access an enum value within the 'Qt' namespace
Qt$Qt$AbsoluteSize

Run the code above in your browser using DataLab