Typwandlung static_cast QPointer
-
Hi,
ich habe ein Objekt vom Typ QPointer und will dieses in ein KindObjekt wandeln nur leider funktioniert das nicht wirklich. Ich steh grad voll auf dem Schlauch und hoffe mir kann jemand helfen.
-
habs gelöst, DANKE.
Lösung:
falls man ein Objekt
QPointer <Typ> obj;
hat muss man zuerst QPointer "wegcasten" und dann wandeln.
static_cast <childTyp*>(static_cast <Typ*> (obj))