I tried to migrate from Qt 4.x to 5.1.1 (project uses OCC).
Seems that there is some issue with migrating:
The first stage.
If I implement virtual paintEngine() function in my derived QWidget class like this.
QPaintEngine *OCCWidget::paintEngine() const
We shall see an access violation in TKV3d.dll while any use of the viewer OCC object.
It happens because of "common" init() function call like in Qt samples in this OCC distrib does not occur.
The last happens because of paintEvent() handler call does not occur in this stage.
The second stage.
If we do not override paintEngine() function in our widget class everething work fine.
But often the widget content is invalid (it shows background widget color instead of proper OCC content).
This stage is exact like implement it in Qt 4.x.
It is a pity that the stage No.1 does not work like with Qt 4.x :(.
I try to solve it.