Hi,
I want to have a user enter a QDateTimeEdit time and then take that info and convert it to unix time that I can store in a double so that I can load up some data. Any Idea how this can be done?
I was thinking I could get the info then convert it to a char * and then maybe convert it to unix? But that is probably totally wrong:
//slot activated when user clicks a pushbutton)
void myWidget::getStartTime
{
QString stEntered
=startTime
->text
();
char * Start = qstrdup( stEntered.toLatin1() );
/// then convert to unix...maybe
}
QDateTimeEdit * startTime;
startTime = new QDateTimeEdit;
//slot activated when user clicks a pushbutton)
void myWidget::getStartTime
{
QString stEntered =startTime->text();
char * Start = qstrdup( stEntered.toLatin1() );
/// then convert to unix...maybe
}
To copy to clipboard, switch view to plain text mode
Is there a different/better way to convert some QDateTimeEdit to a double that will store the time in seconds since Epoch?
Thanks for the help.
Bookmarks