QDate date = ui->dateEdit->date();
std::string strDate = date.toString().toStdString();
How can I store the date in XXXX-XX-XX format as string?
strDate = date.toString("yyyy-MM-dd").toStdString();
Other options and different formats are shown here:
If debugging is the process of removing software bugs, then programming must be the process of putting them in.
~E. W. Dijkstra