[Development] Applications using -fno-rtti

Eike Ziller Eike.Ziller at qt.io
Mon Jun 22 09:22:33 CEST 2020

> On Jun 22, 2020, at 01:18, Thiago Macieira <thiago.macieira at intel.com> wrote:
> On Sunday, 21 June 2020 06:44:23 PDT André Pönitz wrote:
>> I would appreciate if someone on Windows could run a reality check on that
>> with a dynamic_cast between classes that don't have a key function, i.e.
>> where everything is inlined and/or templates.
> They must have a key virtual function. But that's not too much to ask, since 
> Q_OBJECT is already doing that.

dynamic_cast would be most useful if you could avoid using Q_OBJECT (and deriving from QObject) just for the purpose of casting.
If you use Q_OBJECT throughout your class hierarchy, qobject_cast is available anyhow.
So, the argument that Q_OBJECT makes it safe to use dynamic_cast reads a bit strange.

Br, Eike

Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Erich-Thilo-Straße 10
D-12489 Berlin
eike.ziller at qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B

More information about the Development mailing list