Hi Thanks for your replys desantossierra and FelixB.
My new QwtScaleDrawClass looks like: i dont think this is the right way 
"i" is a static var which holds the counter for the hours...
{
public:
QwtScaleDrawTime
(const QTime &base
): baseTime(base)
{
}
virtual QwtText label
(double v
) const {
i++;
qDebug() << "basetime to string" << baseTime.toString() << "v:" << v << "i:" << i;
qDebug() << baseTime.addSecs(3600*i).toString();
return baseTime.addSecs(3600*i).toString();
}
private:
static int i;
};
class QwtScaleDrawTime: public QwtScaleDraw
{
public:
QwtScaleDrawTime(const QTime &base):
baseTime(base)
{
}
virtual QwtText label(double v) const
{
i++;
qDebug() << "basetime to string" << baseTime.toString() << "v:" << v << "i:" << i;
qDebug() << baseTime.addSecs(3600*i).toString();
return baseTime.addSecs(3600*i).toString();
}
private:
QTime baseTime;
static int i;
};
To copy to clipboard, switch view to plain text mode
implements to my plot:
i set the default time to 7:00 to achieve a x-axis from 8-to20. but it doesnt work really well 
it draws on the x-axis 8:00, 10:00 ,11:00....20:00, 09:00... Why is the 09:00 at the end of the x-axis? 
setAxisScale(xBottom, 08.00, 20.00, 1);
new QwtScaleDrawTime(myTime));
setAxisScale(xBottom, 08.00, 20.00, 1);
QTime myTime(7,00);
setAxisScaleDraw(QwtPlot::xBottom,
new QwtScaleDrawTime(myTime));
To copy to clipboard, switch view to plain text mode
i THink i dont get the point, how to implement it -.-
Sorry for that.
Faramia
Bookmarks