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:
Qt Code:
  1. QDateTimeEdit * startTime;
  2. startTime = new QDateTimeEdit;
  3.  
  4. //slot activated when user clicks a pushbutton)
  5. void myWidget::getStartTime
  6. {
  7. QString stEntered =startTime->text();
  8. char * Start = qstrdup( stEntered.toLatin1() );
  9.  
  10. /// then convert to unix...maybe
  11. }
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.