Qt-interest Archive, January 2008
No toUint() member in QVariant ?
Message 1 in thread
I'm using Qt 4.3.2 and am getting the following error from g++:
> File.cpp:88: error: âclass QVariantâ has no member named âtoUintâ
The line of code referenced is:
> mdp_log(QObject::tr("setting file size to %1").arg(file_data["size"].toUint()));
The docs for QVariant indicate a toUint() member, so I'm
baffled as to what I've done wrong. Can anyone see the problem ?
--
[ signature omitted ]
Message 2 in thread
On Sun January 27 2008 13:11, Stephen Collyer wrote:
> I'm using Qt 4.3.2 and am getting the following error from g++:
> > File.cpp:88: error: âclass QVariantâ has no member named âtoUintâ
>
> The line of code referenced is:
> > mdp_log(QObject::tr("setting file size to
> > %1").arg(file_data["size"].toUint()));
>
> The docs for QVariant indicate a toUint() member, so I'm
> baffled as to what I've done wrong. Can anyone see the problem ?
It's a typp. It's called toUInt(), not toUint() :)!
http://doc.trolltech.com/4.3/qvariant.html#toUInt
HTH, RenÃ
--
[ signature omitted ]
Message 3 in thread
R. Reucher wrote:
>> The docs for QVariant indicate a toUint() member, so I'm
>> baffled as to what I've done wrong. Can anyone see the problem ?
> It's a typp. It's called toUInt(), not toUint() :)!
>
> http://doc.trolltech.com/4.3/qvariant.html#toUInt
>
> HTH, RenÃ
Yikes, how embarrassing. I've been staring at that
for half an hour, convinced that it *wasn't* a typo ..
Isn't the capitalization here non-standard for TT
documentation though ?
Thanks, anyway.
--
[ signature omitted ]
Message 4 in thread
On Sun January 27 2008 13:37, you wrote:
> >> The docs for QVariant indicate a toUint() member, so I'm
> >> baffled as to what I've done wrong. Can anyone see the problem ?
> >
> > It's a typp. It's called toUInt(), not toUint() :)!
> >
> > http://doc.trolltech.com/4.3/qvariant.html#toUInt
> >
> > HTH, RenÃ
>
> Yikes, how embarrassing. I've been staring at that
> for half an hour, convinced that it *wasn't* a typo ..
No problem, I know that "phenomenon" as well :)...
> Isn't the capitalization here non-standard for TT
> documentation though ?
I think it's continuous thoughout Qt, also in this case. If they would have
called it "toUnsignedInt()" instead, the "U" would have been a capital letter
as well.
Have fun, RenÃ
--
[ signature omitted ]