overflow.jpgHello,

I'm trying to show date and time in the axis scale getting the values from datadase and seting to a double like this:

Qt Code:
  1. xData->push_back( QString(dt.date().toString("yyyyMMdd") + dt.time().toString("hhmmss")).toDouble() );
To copy to clipboard, switch view to plain text mode 

xData will receive a double like this 20110825093005, but in the graph show me: 2,01108e+13.

I tried use this:

Qt Code:
  1. class TimeScaleDraw: public QwtScaleDraw
  2. {
  3. public:
  4. TimeScaleDraw(QString fmt):
  5. format(fmt)
  6. {
  7. }
  8. virtual QwtText label(double v) const
  9. {
  10. QString data, hora;
  11.  
  12. data = QString::number(v, 'f', 0).left(8);
  13. hora = QString::number(v, 'f', 0).right(6);
  14.  
  15. t.setDate( QDate::fromString( data, "yyyyMMdd"));
  16. t.setTime( QTime::fromString( hora, "hhmmss"));
  17.  
  18. return t.toString(format);
  19. }
  20. private:
  21. QString format;
  22. };
To copy to clipboard, switch view to plain text mode 

But the double v value that i receive ignores time value, something like this: 20110825000000. Works for the data, but not for the time.