The first step can be passing a pointer (or reference) of class
A
to class
B
. If class
B
is created in-time (when double clicking on a row), it can be passed to the constructor. Otherwise implement some kind of set function:
class A;
class B
{
B();
setDataFromA(const A *classA);
};
In the class
B
source file include the header file of class
A
and implement the
setDataFromA
function.
To get data from class
B
into class
A
, implement get functions in class
B
or do it similar by writing a
A::setDataFromB(const B *classB)
function (which again requires a forward declaration to class
B
in the class
A
header file).