Hi,
The following code works but does not ouput the desired result.
#include <QtCore/QCoreApplication>
#include <QDebug>
#include <QString>
int main(int argc, char *argv[])
{
const int timeOut = 3000;
QString string
("Time out in wait for ReadyRead " + timeOut
);
//why no error? , Of course QString::number(timeOut) is right syntax. qDebug()<<string;//prints nothing.
return a.exec();
}
#include <QtCore/QCoreApplication>
#include <QDebug>
#include <QString>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
const int timeOut = 3000;
QString string("Time out in wait for ReadyRead " + timeOut);//why no error? , Of course QString::number(timeOut) is right syntax.
qDebug()<<string;//prints nothing.
return a.exec();
}
To copy to clipboard, switch view to plain text mode
I have a long program which uses static QString in that program the qDebug()<<string prints those static string values, that too which are present in another thread(very strange).
I am not able to reproduce the minimal code which will produce the same bug.
ThankYou,
Bookmarks