wip
This commit is contained in:
@@ -11,13 +11,12 @@
|
||||
#include "selfdrive/ui/qt/widgets/prime.h"
|
||||
#include "system/hardware/hw.h"
|
||||
|
||||
#include <QWebEngineView>
|
||||
|
||||
#ifdef ENABLE_MAPS
|
||||
#include "selfdrive/ui/qt/maps/map_settings.h"
|
||||
#endif
|
||||
|
||||
#include <pybind11/embed.h> // pybind11 header to control Python embedding
|
||||
namespace py = pybind11;
|
||||
|
||||
// HomeWindow: the container for the offroad and onroad UIs
|
||||
|
||||
HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) {
|
||||
@@ -191,15 +190,13 @@ OffroadHome::OffroadHome(QWidget* parent) : QFrame(parent) {
|
||||
QHBoxLayout *home_layout = new QHBoxLayout(home_widget);
|
||||
home_layout->setContentsMargins(0, 0, 0, 0);
|
||||
home_layout->setSpacing(30);
|
||||
|
||||
// Clearpilot: removed home ui widgets
|
||||
py::scoped_interpreter guard{}; // Start the Python interpreter
|
||||
auto python_module = py::module_::import("/data/openpilot/webviewtest.py");
|
||||
auto WebViewWidget = python_module.attr("WebViewWidget");
|
||||
|
||||
auto python_widget_instance = WebViewWidget();
|
||||
auto* python_widget_embedded = python_widget_instance.cast<QWidget*>();
|
||||
home_layout->addWidget(python_widget_embedded);
|
||||
|
||||
// Create a QWebEngineView
|
||||
QWebEngineView *web_view = new QWebEngineView();
|
||||
web_view->load(QUrl("http://fark.com"));
|
||||
|
||||
// Add the QWebEngineView to the layout
|
||||
home_layout->addWidget(web_view);
|
||||
}
|
||||
center_layout->addWidget(home_widget);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user