wip
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
#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) {
|
||||
@@ -190,6 +193,13 @@ OffroadHome::OffroadHome(QWidget* parent) : QFrame(parent) {
|
||||
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);
|
||||
}
|
||||
center_layout->addWidget(home_widget);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user