[Qt-interest] can't get Qdate

wim.delvaux at adaptiveplanet.com wim.delvaux at adaptiveplanet.com
Fri Mar 5 01:21:59 CET 2010


On Thursday 04 March 2010 11:25:12 mierdatutis mi 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"));

perhaps this is the problem ... try

hora->setText( QString( "Timess: " ) + ... );

the + operator does not convert "Timess" to QString and hence you perhaps ust 
add pointers to strings and not concat strings ?

W

> 
> But doesn't show me nothing in my label
> 
> Any help?
> Many thanks and sorry for my english!
> 



More information about the Qt-interest-old mailing list