Hey there,

I have a QGraphicsView which contains another QGraphicsView embeded in a QGraphicsProxyWidget.

Here is my insertWidget function :

Qt Code:
  1. /* virtual */ void qkListBase::insertWidget(int index,
  2. QWidget * widget,
  3. int stretch,
  4. Qt::Alignment alignment)
  5. {
  6. if (contains(widget)) return;
  7.  
  8. Q_D(qkListBase);
  9.  
  10. QGraphicsProxyWidget * proxyWidget = scene()->addWidget(widget);
  11.  
  12. QPalette p(widget->palette());
  13. p.setColor(QPalette::Window, Qt::transparent);
  14. widget->setPalette(p);
  15.  
  16. qkListBasePrivate::item * Item = new qkListBasePrivate::item(proxyWidget);
  17. Item->proxyWidget = proxyWidget;
  18. Item->stretch = stretch;
  19. Item->alignment = alignment;
  20.  
  21. d->items.push_back(Item);
  22.  
  23. d->resetGeometry();
  24. }
To copy to clipboard, switch view to plain text mode 

- When I add a widget into my main QGraphicsView / scene : it works fine.
- When I add a widget into a QGraphicsView inside my main QGraphicsView I get the following :

Qt Code:
  1. warning: QPainter::begin: A paint device can only be painted by one painter at a time.
  2.  
  3. warning: QPainter::begin: A paint device can only be painted by one painter at a time.
  4.  
  5. warning: ASSERT: "state" in file kernel\qwidget.cpp, line 4470
  6.  
  7. warning: Invalid parameter passed to C runtime function.
  8.  
  9. warning: Invalid parameter passed to C runtime function.
  10.  
  11. warning: QPainter::begin: A paint device can only be painted by one painter at a time.
To copy to clipboard, switch view to plain text mode 

Anyone knows why ?