QMetaMethod Class

  • Header: QMetaMethod

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Core)

    target_link_libraries(mytarget PRIVATE Qt6::Core)

  • qmake: QT += core

  • Group: QMetaMethod is part of objectmodel

Detailed Description

A QMetaMethod has a methodType(), a methodSignature(), a list of parameterTypes() and parameterNames(), a return typeName(), a tag(), and an access() specifier. You can use invoke() to invoke the method on an arbitrary QObject.

See Also

Member Type Documentation

 

enum QMetaMethod::Access

This enum describes the access level of a method, following the conventions used in C++.

Constant

QMetaMethod::Private

0

QMetaMethod::Protected

1

QMetaMethod::Public

2

enum QMetaMethod::MethodType

Constant

Value

Description

QMetaMethod::Method

0

The function is a plain member function.

QMetaMethod::Signal

1

The function is a signal.

QMetaMethod::Slot

2

The function is a slot.

QMetaMethod::Constructor

3

The function is a constructor.

Member Function Documentation

 

QMetaMethod::Access QMetaMethod::access() const

Returns the access specification of this method (private, protected, or public).