It looks like the question is asked in the subj.
Here is an example:
class Sender : public QObject
{
signals:
sgSend(const QString&) const;
};
class Receiver : public QObject
{
public slots:
slReceive(const QString& value)
{ qDebug() << value; }
};
And if I connect them with the following line:
connect(sender, SIGNAL(sgSend(const QString&)), receiver, SLOT(slReceive(const QString&)));
my project is being built successfully, but it looks like the connection is not being established. I feel that I need to specify in some a way that the sgSend
method is qualified with const
, but I am not sure how to do this.
I think, if I'll use the new syntax of the connect
, it will work. But for certain reasons, I cannot use it.