hi,
i have problems with a signal.
so i make the signal in the header file
signals:
signals:
QString signal_add_to_list(QString, QString);
To copy to clipboard, switch view to plain text mode
and emit it in a funktion
emit this->signal_add_to_list(typ, name);
emit this->signal_add_to_list(typ, name);
To copy to clipboard, switch view to plain text mode
I connected it with a slot in the same class, just to test if it works.
connect(this, SIGNAL(signal_add_to_list(QString,QString)), this, SLOT(slot_test(QString,QString)));
To copy to clipboard, switch view to plain text mode
slot:
public slots:
public slots:
void slot_test(QString atyp, QString aname);
To copy to clipboard, switch view to plain text mode
cout<<"it works"<<atyp.toStdString()<<aname.toStdString()<<endl;
}
void ClassName::slot_test(QString atyp, QString aname){
cout<<"it works"<<atyp.toStdString()<<aname.toStdString()<<endl;
}
To copy to clipboard, switch view to plain text mode
This slot just say "it works" if it would work, but it doesnt. The compiler doesnt say an error or a warning and i already made a few signals in the same class and they works all, but i cant see the reason why this doesnt work.
Thanks for reading and may you know the answer.
mark
Bookmarks