Ok... is this?
Qt Code:
//we already have a QDateTimeEdit called "myDateTimeEdit" myDateTimeEdit.setDateTime(datetime);To copy to clipboard, switch view to plain text mode
the point I don't understand is a "QDateTimeEdit into a QTextEdit"
Ok... is this?
Qt Code:
//we already have a QDateTimeEdit called "myDateTimeEdit" myDateTimeEdit.setDateTime(datetime);To copy to clipboard, switch view to plain text mode
the point I don't understand is a "QDateTimeEdit into a QTextEdit"
briang (16th October 2009)
This might be what you are after:
Qt Code:
// get the value from the edit // format with the same format as the date time edit // do stuff with the time/date string ...To copy to clipboard, switch view to plain text mode
briang (16th October 2009)
G'day Jano and Chris
YES that is exactly what i was after
QDateTime datetime1 = QDateTime::currentDateTime(); //sets QDateTimeEdit to today.
dateTimeEdit->setDateTime(datetime1);
QDateTime datetime2 = dateTimeEdit->dateTime(); //prints QDateTimeEdit to textEdit
QString timeDateString = datetime2.toString(dateTimeEdit->displayFormat());
textEdit->append(timeDateString); |
Chris you show a full stop here but when i press fullstop i get this automatically.
i did not know this to till now.
At the moment i am just trying out how the various widgets interconnect.
am now going to attack QTable ect.
using Qt Creator 1.2.1 Qt4.5.2 (64bit) on kde4.3.1
THANK YOU THANK YOU both
Qt Creator is the ants pants.
regards to you both
Brian.
Bookmarks