M
M
maaGames2020-01-02 07:21:38
Qt
maaGames, 2020-01-02 07:21:38

QT offscreen dialog?

Is it possible in QT to create dialog boxes in the offscreen buffer?
Those. so that the dialog box is not visible on the screen and it is drawn to a bitmap that can be drawn anywhere. For example, on the monitor screen in the game (i.e. make a really working interactive interface) or embed a QT dialog into a WinAPI/MFC dialog. Of course, mouse/keyboard events will have to be converted and forwarded manually.
I know there is an OffscreenSurface, but that's for OpenGL and there's a RasterWindow, but it's kind of there for drawing. I just need to draw standard QT dialogs in a bitmap (It doesn't matter, with or without QML. Probably better with it).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
towin, 2020-01-02
@towin

Try something like this:

QPixmap pixmap(widget->size());
widget->render(&pixmap);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question