Porting Qt-based UI to QML
I have an e-book reader using a custom version of QStackedWidget for showing pages. How can I use my custom widget in a QML script ? I would like to be able to reuse as much code as possible for the UI.
Actually, I think rewrite it in QML would be much easier and more elegance than wrap your QStackedWidget into QML (with z-index, x, y and some animation element...)
Besides, in Qt5, I think the performance would be better, too.
yes, it seems the best option
This is true. The closest you can get to re-using widget code is to port your QWidget into QQuickPaintedItem. This will at least allow you to re-use your qpainter drawing code. We are working on making it possible to embed qtquick 2 inside QWidget. This would make it possible to at least partially make use of qt quick in your application. This is will happen in 5.1 earliest.