[odb-users] Persist container derived class as value type

Henning Becker henning.becker at apworks.de
Fri Mar 4 15:32:49 EST 2016


Hi,
I'm trying to persist QPolygon from Qt as a value type. QPolygon inherits from 
QVector<QPoint> and no data will be lost, if it is handled just as a 
QVector<QPoint>.

I have defined QPoint as a composite value type:
#pragma db value(QPoint) transient
#pragma db member(QPoint::x_) virtual(int) get(x) set(setX)
#pragma db member(QPoint::y_) virtual(int) get(y) set(setY)

But how can I make odb handle QPolygon as a QVector<QPoint>?

Thanks,
Henning

-- 
_______________________________________
 
Henning Becker

Development Engineer

AIRBUS APWORKS GmbH
Willy-Messerschmitt-Str. 1
82024 Taufkirchen - Germany 
T: +49 (0) 89 607 29771  
F: +49 (0) 89 607 28239  
M: +49 (0) 174 9818097  
henning.becker at apworks.de 

AIRBUS APWORKS GmbH
Registered Office: Ottobrunn
District Court of Munich: HRB 141734
Managing Director: Joachim Zettler
Internet: www.apworks.de
_______________________________________



More information about the odb-users mailing list