add QTVulkan example
This commit is contained in:
21
example/Vulkan/QtVulkanMainWindow.cpp
Normal file
21
example/Vulkan/QtVulkanMainWindow.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include"QtVulkanMainWindow.h"
|
||||
|
||||
MainWindow::MainWindow(QtVulkanWindow *w):m_window(w)
|
||||
{
|
||||
this->setWindowTitle(QString("Vulkan and QT"));
|
||||
|
||||
QWidget *wrapper = QWidget::createWindowContainer(w);
|
||||
QVBoxLayout *layout = new QVBoxLayout;
|
||||
|
||||
m_info=new QPlainTextEdit;
|
||||
m_info->setReadOnly(true);
|
||||
|
||||
layout->addWidget(m_info,1);
|
||||
layout->addWidget(wrapper,5);
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
void MainWindow::onVulkanInfoReceived(const QString &text)
|
||||
{
|
||||
m_info->setPlainText(text);
|
||||
}
|
Reference in New Issue
Block a user