I have a QGraphicsWidget which I am using to paint and display a number of items including a QWebEngineView using the QGraphicsProxyWidget. I am able to load web content into QWebEngineView, but I would like to make the view contain a border. I have used "setStyleSheet" to try to add a border, but this does not appear to work. The following code is in the constructor of my QGraphicsWidget class to add the QWebEngineView:
QWebEngineView * view = new QWebEngineView();
view->setFixedWidth(700);
view->setFixedHeight(200);
view->setStyleSheet("border: 10px border-color: black");
view->load(QUrl("qrc:/myresources/guidetext.html"));
QGraphicsProxyWidget * proxyView = new QGraphicsProxyWidget(this);
proxyView->setWidget(view);
This is how it currently looks:
How I would like it to look like: