Unsolved Creating a Vulkan VkSurface from a QWidget
-
Greetings,
I have a widget class that is derived from QWidget. I currently use it to render with OpenGLES. For that purpose, I create an EGLSurface from the underlying native window handle using eglCreateWindowSurface.
Now I plan to switch the rendering to Vulkan which means I have to create a VkSurface instead. However, the only means I know to do that is to use QVulkanWindow which already includes a lot of Vulkan setup stuff I don't need at this point. Also, I'd like to keep my Widget class and only apply minimal changes to it if possible. The QVulkanWindow source
https://code.woboq.org/qt5/qtbase/src/gui/vulkan/qvulkanwindow.cpp.html
Uses a method surface = QVulkanInstance::surfaceForWindow(q); but it also only seems to work with full QWindow objects.
Is there a way to get a VkSurface from a QWidget instead of a QWindow class?
Regards