The new Graphics View framework is great, but I'm having a problem with grouping items. In the example below, only the text item not in the group can be edited. How can I allow the user to edit text items in groups?
Thanks,
Wesley

Qt Code:
  1. #include <QtGui>
  2.  
  3. int main(int argc, char *argv[]) {
  4. QApplication app(argc, argv);
  5. QGraphicsScene *scene = new QGraphicsScene(&win);
  6.  
  7. QGraphicsTextItem *textItem = new QGraphicsTextItem("In a Group", NULL, scene);
  8. textItem->setPos(50, 50);
  9. textItem->setTextInteractionFlags(Qt::TextEditable|Qt::TextSelectableByMouse);
  10. QGraphicsItemGroup *group = new QGraphicsItemGroup(NULL, scene);
  11. group->addToGroup(textItem);
  12.  
  13. QGraphicsTextItem *textItem2 = new QGraphicsTextItem("Not in a Group", NULL, scene);
  14. textItem2->setPos(50, 10);
  15. textItem2->setTextInteractionFlags(Qt::TextEditable|Qt::TextSelectableByMouse);
  16.  
  17. win.setScene(scene);
  18. win.show();
  19. app.exec();
  20. return 0;
  21. }
To copy to clipboard, switch view to plain text mode