Skip to content

ramezanifar/child_parent_event

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

child_parent_event

How a child class sends data to the parent class via events

Problem Statement

In this tutorial, we will see how data can be exchanged between a parent and child. There is a sample in python.

Description

A Parent sequence can access child's methods directly. One way for child to access parent's methods is to use events. The child can send an event to an event handler. If the parent listens to that event, the event handler will dispatch the event data to it.

Parent-Child

In the given example, run the parent.py. It sends a message to the child by accessing its method directly. In response, the child sends an event. The EventHandler dispatches the event to all listeners. Since Parent listens to that event, it receives the response.

About

How a child class sends event to the parent class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages