Widget over the QVulkanWindow
-
Hey guys, iam creating game with Vulkan. Iam embedding QVulkanWindow in MainWindow like this:
QWidget *container = QWidget::createWindowContainer(vw); mw.ui->gamePanelLayout->addWidget(container);
I want to have little widget over the QVulkanWindow, where will be pause and end button. Problem is, that container widget, created by function QWidget::createWindowContainer() will be always on top.
Documentation says: Stacking order; The embedded window will stack on top of the widget hierarchy as an opaque box.I tried for example QStackedLayout, but nothing works out. Is there any way how to do it? Thanks!
-
Documentation says: Stacking order; The embedded window will stack on top of the widget hierarchy as an opaque box.
As the documentation says it won't work with any layouts or such. Qt draws all its widgets on a window surface and Vulkan draws on another surface that is layered on top. If you want to have something else above that you need another window (frameless and transparent probably).