PDA

View Full Version : QDate



bartes19
8th January 2016, 13:25
Problem in the screen :

11626

ars
8th January 2016, 15:01
Hello,

the compiler gives you a precise error message: there exists no conversion from QString to QDate. In other words: you cannot assign a QString (obtained from your QLineEdit object) to a QDate.

However, there exist static methods for converting a QString to a QDate:
QDate fromString(const QString & string, Qt::DateFormat format = Qt::TextDate)
QDate fromString(const QString & string, const QString & format)
See QDate documentation for more details.

For future posts: Please do not post screen shots with code and compiler error messages. They are hard to read. Use code tags to wrap code snippets and error messages.

Best regards
ars