Replies: 1 comment 7 replies
-
At this point we do not expose the Generally speaking, composition of a scene rendered with Slint controls on top of another scene should always be possible one way or another. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a large C++/QtWidgets application (LibrePCB) making heavy use of
QGraphicsScene
and am evaluating alternative UI toolkits - in particular QtQuick and Slint. But for a step-by-step migration, I need a way to integrate the already existingQGraphicsScene
since a rewrite of it would be too much effort.In QtQuick I was able to build a PoC using
QQuickPaintedItem
which provides aQPainter
where I can render the scene withQGraphicsScene::render()
. Works quite well so far.If I understand correctly, the Qt backend of Slint uses
QPainter
for drawing the whole window. So I wonder if it would be possible to draw on the window through thisQPainter
? Ideally in background, so that Slint controls can be used as overlay on the painted scene.Is it possible to get access to the
QPainter
of the Qt backend from C++? Or any other idea how to integrate aQGraphicsScene
?Another story is whether Slint works together with a Qt application at all, as probably I need to run Qt's event loop somehow to get all the events etc. working - or would this even work out of the box with the Qt backend 🤔 EDIT: This seems to work indeed!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions