Canvas QT?
-
Hello, i created vulkan window(https://doc.qt.io/qt-5/qtgui-hellovulkanwindow-example.html). I just want to ask, if in QT is something like wxGLCanvas in wxwidgets... I want to have normal GUI(MainWindow), and then when i press button, i want to "Canvas" appear, and then vulkan drawing will start. Can someone help me out, how could i do that?
Thank you very much! -
Hello, i created vulkan window(https://doc.qt.io/qt-5/qtgui-hellovulkanwindow-example.html). I just want to ask, if in QT is something like wxGLCanvas in wxwidgets... I want to have normal GUI(MainWindow), and then when i press button, i want to "Canvas" appear, and then vulkan drawing will start. Can someone help me out, how could i do that?
Thank you very much!Yes, you can embed a
QWindow(in your case yourQVulkanWindow) asQWidgetin yourQMainWindowand show it when you press a button, for example.It's done with a Qt3D window here
Just look at the code and replace the
Qt3DExtras::Qt3DWindow *view = new Qt3DExtras::Qt3DWindow();window with your Vulkan window.
Then create aQWidgetcontainer for yourQWindowlike this:QWidget *container = QWidget::createWindowContainer(view); -
Yes, you can embed a
QWindow(in your case yourQVulkanWindow) asQWidgetin yourQMainWindowand show it when you press a button, for example.It's done with a Qt3D window here
Just look at the code and replace the
Qt3DExtras::Qt3DWindow *view = new Qt3DExtras::Qt3DWindow();window with your Vulkan window.
Then create aQWidgetcontainer for yourQWindowlike this:QWidget *container = QWidget::createWindowContainer(view);@Pl45m4 Thank you very much, all working! Appriciate your help:)
-
P primator77 has marked this topic as solved on