i have classes like this
class A : public QDialog
{
A(QWidget *parent);
static map<int,QString> dataa;
};
class B : public QThread
{
public void run();
}
class C : public QDialog
{
public void abc();
}
Defination of classes
void B::run()
{
in this function,i am using __dataa__ as __dataa.insert__which is defined initially in A class as public.
}
void C::abc()
{
in this function also,i am using __dataa__ as __dataa.find__ and dataa.end__ which is defined initially in A class as public.
}
Now please help me how can i use that variable dataa in the other two classes B and C.somewhere i seen we have to declare it as static and use it in the B and C class as A::data but its not working and giving error.
these three classes are initialized as
int main()
{
A window;
B datathread;
datathread.start
//B is Qthread inherited and A,C are QDialog inherited
}
class C is initialized from class A by clicking a pushbutton on it and opening its dialog in a new window. i guess this time i wont be blamed for not clearly formulating my question.please on gods name help me as i am stuck over this from long time.a big thanks in advance for any kind of help.