I have the following code
Qt Code:
  1. #include <QGraphicsScene>
  2. #include <QMessageBox>
  3. #include "proFootballOnline.h"
  4. //
  5. ProFootballOnline::ProFootballOnline( QWidget * parent, Qt::WFlags f)
  6. : QMainWindow(parent, f)
  7. {
  8. setupUi(this);
  9. }
  10.  
  11. void ProFootballOnline::Init ()
  12. {
  13.  
  14. }
  15. void ProFootballOnline::on_initPB_clicked()
  16. {
  17. scene.addText("Bob");
  18. //scene.setItemIndexMethod(QGraphicsScene::NoIndex);
  19. //fieldGV->setBackgroundBrush(Qt::green);
  20. fieldGV->setScene(&scene);
  21. fieldGV->update();
  22. }
To copy to clipboard, switch view to plain text mode 

When the program runs and the initPB is clicked, the program closes a does a core dump. I ran it through a debugger and, depending on what I try to do with the scene, faults on various things (setBackground, setItemIndexMode). The fieldGV is a QGraphicsView I have on my main window. Any ideas on what is causing the crash? If I place a QMessageBox at the end of the slot, i can see the contents of fieldGV update properly but closing the box sets off the core dump.

mAx