Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

can i use reference in signal slots

$
0
0
myfirst::myfirst(QObject *parent) :     QObject(parent) {     connect(this,SIGNAL(set(QString)),this,SLOT(seting(QString),Qt::QueuedConnection);     connect(this,SIGNAL(set(QString)),this,SLOT(seting2(QString)),Qt::QueuedConnection);     }     void myfirst::seting(const QString  &slot1) {     qDebug()<<&slot1;                   }   void myfirst::seting2( const QString  &slot2) {     qDebug()<<&slot2;  }   void myfirst::hjk(QString  & j) //this is mu public method just emitting signal {       emit set(j); } If i am not use reference then both printing same addresses if i use reference then printing different addresses. what is the difference

Viewing all articles
Browse latest Browse all 4972

Trending Articles