@nagesh said in QTimeEdit to Double:
@EUduardo QTime class provides function to get the "delta" time between the two "Qtimes".
You can convert the time to elapsed count, having origin Time as reference time.
eg:
QTime timeOrigin(5,30,0);
QTime timeXVal1(5,45,0);
int elapsedSec =timeOrigin.secsTo(timeXVal1);
this elapsedSec value can be used for plot the value in X-Axis.
it worked, thanks, this is what i did:
const QTime timeOrigin(0,0,0);
int xval;
void MainWindow::on_QTimeEdit_userTimeChanged(const QTime &time)
{
xval = timeOrigin.secsTo(time);
}
void MainWindow::on_confirmBTN_clicked()
{
addpoint(xval,ui->bx_y->value());
plot();
}