1 Attachment(s)
Qwt date and time problem
Attachment 6795Hello,
I'm trying to show date and time in the axis scale getting the values from datadase and seting to a double like this:
Code:
xData
->push_back
( QString(dt.
date().
toString("yyyyMMdd") + dt.
time().
toString("hhmmss")).
toDouble() );
xData will receive a double like this 20110825093005, but in the graph show me: 2,01108e+13.
I tried use this:
Code:
{
public:
format(fmt)
{
}
virtual QwtText label
(double v
) const {
data
= QString::number(v,
'f',
0).
left(8);
hora
= QString::number(v,
'f',
0).
right(6);
t.
setDate( QDate::fromString( data,
"yyyyMMdd"));
t.
setTime( QTime::fromString( hora,
"hhmmss"));
return t.toString(format);
}
private:
};
But the double v value that i receive ignores time value, something like this: 20110825000000. Works for the data, but not for the time.