|  | Home · All Classes · Modules

# QMetaMethod Class Reference
[QtCore module]

The QMetaMethod class provides meta-data about a member function. More...

### Types

- enum Access { Private, Protected, Public }
- enum MethodType { Method, Signal, Slot }

### Methods

- __init__ (self)
- __init__ (self, QMetaMethod other)
- Access access (self)
- MethodType methodType (self)
- QByteArray-list parameterNames (self)
- QByteArray-list parameterTypes (self)
- str signature (self)
- str tag (self)
- str typeName (self)

## Detailed Description

The QMetaMethod class provides meta-data about a member function.

A QMetaMethod has a methodType(), a signature(), a list of parameterTypes() and parameterNames(), a return typeName(), a tag(), and an access() specifier.

See also QMetaObject, QMetaEnum, QMetaProperty, and Qt's Property System.

## Type Documentation

### QMetaMethod.Access

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

Constant | Value
--- | ---
`QMetaMethod.Private` | `0`
`QMetaMethod.Protected` | `1`
`QMetaMethod.Public` | `2`

### 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.

## Method Documentation

### QMetaMethod.__init__ (self)

### QMetaMethod.__init__ (self, QMetaMethod other)

### Access QMetaMethod.access (self)

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

Signals are always protected, meaning that you can only emit them from the class or from a subclass.

See also methodType().

### MethodType QMetaMethod.methodType (self)

Returns the type of this method (signal, slot, or method).

See also access().

### QByteArray-list QMetaMethod.parameterNames (self)

Returns a list of parameter names.

See also parameterTypes() and signature().

### QByteArray-list QMetaMethod.parameterTypes (self)

Returns a list of parameter types.

See also parameterNames() and signature().

### str QMetaMethod.signature (self)

Returns the signature of this method (e.g., `setValue(double)`).

See also parameterTypes() and parameterNames().

### str QMetaMethod.tag (self)

Returns the tag associated with this method.

Tags are special macros recognized by `moc` that make it possible to add extra information about a method. For the moment, `moc` doesn't support any special tags.

### str QMetaMethod.typeName (self)

Returns the return type of this method, or an empty string if the return type is void.