Hi,

I want to display a widget with a QTextBrowser in it on a QGraphicsView. Therefore I use a QGraphicsProxy object and add it to the view.

Problem is, that the text is not drawn properly and that there is a solid rectangle in the lower right corner. Is this use case not supported? Or, did I just stumble across a bug? Did anyone already tried displaying a QTextBrowser on a QGraphicsview?

To test it separately, I created a QGraphicsView on a QMainWindow in the designer and added following code in the constructor:

Code:
	ui.setupUi(this);
	
	QTextBrowser* browser = new QTextBrowser();
	
	browser->setHtml("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
			"<html><head></head><body><h1>Lorem ipsum</h1><p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p></body></html>");
	
	QGraphicsProxyWidget* proxy = new QGraphicsProxyWidget();
	proxy->setWidget(browser);
	
	QRectF r;
	r.setRect(0.f,0.f,160.f,120.f);
	QGraphicsScene* scene = new QGraphicsScene();
	scene->setSceneRect(r);
	scene->addItem(proxy);
	
	ui.graphicsView->setScene(scene);
Any help highly appreciated.

- Wolfgang