[Qt-interest] can't get Qdate

Scott Aron Bloom Scott.Bloom at sabgroup.com
Fri Mar 5 01:45:14 CET 2010


I would do a dias.isValid() afterwards...

If it is not valid, it's your pepelu string not containing the format you expect...

Create a simple complete testcase showing the problem (ie the actual value of pepelu)

Scott

-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Dan White
Sent: Thursday, March 04, 2010 05:33
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] can't get Qdate

What is the type and value of lineaHora ?

“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

----- mierdatutis mi <mmm286 at gmail.com> wrote:
> Hi.
> 
> I do:
> 
> QString pepelu = lineaHora.left(6)+lineaHora.right(5);
> QDateTime dias = QDateTime::fromString(pepelu,"yyMMddhhmm");
> 
> it gives me: 1003030900
> 
> I do:
> 
> hora->setText("Timess: " + dias.toString("yyMMddhhmm"));
> 
> But doesn't show me nothing in my label
> 
> Any help?
> Many thanks and sorry for my english!


_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list