I have 2 differents functions/slots (in the same class) in which I emit the same signal and...one of them works, that is the slot associated to this signal is executed, and the second one does not! I have made a copy-paste of the slot code so as to be sure that it was exactly the same and still this inbelievable error! To sum up my code:
class A
{
public slots:
void sl(<some data type>);
};
class B
{
signals:
void si(<some data type>);
public slots:
void sl1() {emit si(<some data type>);};
void sl2() {emit si(<some data type>);};
};
main()
{
A a;
B b;
QObject::connect(B,
SIGNAL(si
(<some data type>
)), A,
SLOT(sl
(<some data type>
)));
...
}
class A
{
public slots:
void sl(<some data type>);
};
class B
{
signals:
void si(<some data type>);
public slots:
void sl1() {emit si(<some data type>);};
void sl2() {emit si(<some data type>);};
};
main()
{
A a;
B b;
QObject::connect(B, SIGNAL(si(<some data type>)), A, SLOT(sl(<some data type>)));
...
}
To copy to clipboard, switch view to plain text mode
Of course <some data type> is identical everywhere.
Did anybody face a so strange story?
Bookmarks