you've been reading? So you saw this http://qt-project.org/doc/qt-4.8/qdatetime.html#setDate ?
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
And what does this method return? Does it return QDate? Or QDate & ? If it returns QDate, then this is a temporary, a copy of the QDate stored in data_incio. Changing the copy has no effect at all on on the original QDate stored in data_incio.ui->data_inicio->date()
Of course the setDate() function call will return true, because even if the QDate is a temporary, setting it to a new date will work just fine. It just has no effect, because at the end of that line of code, the copy is destroyed and whatever changes you made go with it.
Last edited by d_stranz; 8th May 2012 at 17:43.
Or maybe, since Daniel won't tell us what "data_inico" is, we can just keep guessing at answers until one of us guesses correctly.Maybe you should call setDate() on the ui->data_inicio object?
try reading the thread
try reading the docs http://qt-project.org/doc/qt-4.8/qda...blic-functions
Last edited by amleto; 17th May 2012 at 23:37.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
I managed to solve the problem.
Now I can not and the pm or am a QTimeEdit. I've had to do the builders and they do not allow for it ... How do I solve this?
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
I have the following code.
Qt Code:
To copy to clipboard, switch view to plain text mode
Where do I put the AM or PM?
no, that's not what you did, and no, it shouldn't work.
Look carefully!
http://qt-project.org/doc/qt-4.8/qdatetime.html#setDate
http://qt-project.org/doc/qt-4.8/qdate.html#setDate
and try again...
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
Bookmarks