vendredi 8 mai 2015

How to use qDebug() with two parameters in qt?

I am trying to use qDebug() with two parameters but it fails everytime.

When I use separately there is no problem, such as;

qDebug() << "img:width = " << img.width();
qDebug() << "img:height = " << img.height();

However when I combine them, it gives error.

qDebug() << "img:width = " << img.width() << "/t img:height = " << img.height() << std::endl;

Error is :

error: no match for 'operator<<' in '((QDebug*)((QDebug*)((QDebug*)qDebug()().QDebug::operator<<(((const char*)"img:width = ")))->QDebug::operator<<(img.QImage::width()))->QDebug::operator<<(((const char*)"/t img:height = ")))->QDebug::operator<<(img.QImage::height()) << std::endl'

Can I use two or more parameters in qDebug?

Aucun commentaire:

Enregistrer un commentaire