K
K
Kalombyr2017-10-19 14:13:54
Qt
Kalombyr, 2017-10-19 14:13:54

Is it possible to display (render) qml into a picture (QCanvas)?

Good day.
We need to do something like a printable generator, I took a closer look - QML is ideal for this in terms of the convenience of arranging labels, lists and other things (I still have to do them in the future).
The question arose - how can one enter data into it without displaying QML on the screen and display it in a picture (later it will be displayed in QCanvas)?
I tried to do it through QQuickView, but it is clearly stated that the window must be VISIBLE and have the required dimensions doc.qt.io/qt-5/qquickwindow.html#grabWindow generators, but I don’t want to deal with them and finish them to fit the needs.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2017-10-20
@Zifix

You have no idea how much easier it is to take a ready-made generator than to write a QML console application for this purpose, from scratch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question