API Documentation
Loading...
Searching...
No Matches
WebViewWidget.h
Go to the documentation of this file.
1/*#pragma once
2#include <QtWebView>
3#include <QQuickWidget>
4#include <QVBoxLayout>
5#include <QWidget>
6namespace NDEVR
7{
8
9 class WebViewWidget : public QWidget
10 {
11 Q_OBJECT
12 public:
13 WebViewWidget(QWidget* parent = nullptr)
14 : QWidget(parent)
15 {
16 // Wrap QWebView in QQuickWidget
17 qmlWidget = new QQuickWidget(this);
18 qmlWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
19 qmlWidget->setSource(QUrl("qrc:/qml/webview.qml")); // Example QML file
20
21 // Layout setup
22 QVBoxLayout* layout = new QVBoxLayout(this);
23 layout->addWidget(qmlWidget);
24 setLayout(layout);
25 }
26 private:
27 QQuickWidget* qmlWidget;
28 };
29}*/