Find child by name

Share:

Description

Finds a child QObject by name. Mirrors a function in Qt that is inaccessible via the ordinary interface because it is a template.

Usage

1

Arguments

x

The parent QObject

name

The name of the child

Details

This is particularly useful when working with QtDesigner, where objects in the UI file are named.

Value

The child QObject

Author(s)

Michael Lawrence

Examples

1
2
3
4
parent <- Qt$QObject()
child <- Qt$QObject(parent)
child$objectName <- "foo"
qfindChild(parent, "foo")