⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)
Transfer Data Between Two Forms
XADOOO last edited by
I have a "mainwindow" form named "program" and other form named "addstateform" which is created when I press a button on the "program" form. I want to collect the data from the "addstateform" to do stuff after this form is closed.
I've tried following this tutorial:
But it didn't work. I'm also new to Qt so I don't understand very well the connect function and the signals and slots.
void SendData(QString text);
QString text = "HI";
qDebug() << "Signal Generated";
void GetData(QString text);
void Program::GetData(QString text)
qDebug() << "Text Received: " << text;
qDebug() << "Signal Received";
I get this error in both "connect" lines:
no matching function for call to 'Program::connect(AddStateForm&, const char, Program* const, const char)'
I can't figure out what I'm missing/doing wrong.
Would appreciate some help and explanation. Sorry for the long post.
It should be:
You need to pass the address of your QObject to the connect function
Franckynos last edited by
This post is deleted!