title: Qwt date-time axis
body: <p>I inherit class from QwtScaleDraw to show date-time axis:</p>
  
  <pre><code>class TimeScaleDraw: public QwtScaleDraw {
  public:
  TimeScaleDraw(const QDateTime &amp;base) : baseDateTime(base) {
    setLabelRotation(0);
    setLabelAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
    setSpacing(20);
  }
  virtual QwtText label(double v) const {
    QDateTime dateTime;
    dateTime = dateTime.fromTime_t(v);
    return dateTime.toString("yyyy.MM.dd\nhh:mm:ss");
  }
  private:
  QDateTime baseDateTime;
  };
  </code></pre>
  
  <p>In main file I use it as:</p>
  
  <pre><code>funPlot-&gt;setAxisScaleDraw(QwtPlot::xBottom, new TimeScaleDraw(QDateTime::currentDateTime()));
  </code></pre>
  
  <p>I want to see the current date-time when I run the app. Is it possible? Now it displays as 1970.01.00 00:00:00 with an appropriate scale.</p>