View Full Version : invalidate QDateTime
Markus_AC
7th September 2011, 10:56
I want to invalidate QDateTime or at least member date of QDateTime. When creating a new QDateTime it's invalid by default. But how can I get to this state after having had a vaild date?
ChrisW67
7th September 2011, 11:05
Umm, assign a new invalid value to it:
QDateTime test = QDateTime::currentDateTime();
qDebug() << test.isValid(); // true
test = QDateTime();
qDebug() << test.isValid(); // false;
Markus_AC
7th September 2011, 11:14
life can be sooo easy :p
Thanks!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.