I am using the find file dialog code at https://doc.qt.io/archives/qt-4.8/qt...s-example.html
I added the lines:Qt Code:
qDebug() << sdate; fileNameItem->setFlags(fileNameItem->flags() ^ Qt::ItemIsEditable); .arg(fdate.toString()));To copy to clipboard, switch view to plain text mode
QFileInfo(file).lastModified() gives the the following info:
Wed March 18 16:15:33 2020
Seems like kind of a jumbled way of providing a date time.
So I want just 03/18/2020 I feed it into QString sdate = fdate.toString("mm/dd/yyyy");
But this gives me "33/18/2020"
First How do I get the file info lastModified to appear as 03/18/2020?
Second I changed the declaration for sizeItem to:
QTableWidgetItem *sizeItem = new QTableWidgetItem(tr("")
.arg(fdate.toString()));
I want the date to be printed out instead of the file size. File size is useless to my needs.
How can I accomplish that part?
Thanks to all
emp1953
Bookmarks