[Development] Converting types in Qt

Ziller Eike Eike.Ziller at digia.com
Wed Jul 16 17:51:45 CEST 2014

On Jul 16, 2014, at 5:04 PM, Thiago Macieira <thiago.macieira at intel.com> wrote:

> On Wednesday 16 July 2014 15:01:53 Ziller Eike wrote:
>> No idea what happens in animations, but I’d suppose that any conversions
>> there would be accidentally.
> QPropertyAnimation is based on modifying QVariants, isn't it?

True, but I’d claim that that shouldn’t need automatic conversions between types.
If I create a QPropertyAnimation on a “qreal” property, and set “qreal” start and end values, then there should not happen any automatic conversions.
If I’d set end value “10.0” (i.e. QString), then I’d consider that very bad style. Maybe we have some int/real conversions happening there, which could at least argued to not do much harm.

Eike Ziller, Senior Software Engineer - Digia, Qt
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin. Registergericht: Amtsgericht Charlottenburg, HRB 144331 B 

More information about the Development mailing list