Hello friends, now I try to locate my error in my logic.

here are a piece of my app:

Qt Code:
  1. //**************************************************************************
  2. void MdlProjektErstellung::newOrderSpace()
  3. //**************************************************************************
  4. {
  5. bool ok1,ok2;
  6. QString dir = QFileDialog::getExistingDirectory(this, tr("open group path"),
  7. "C:",
  8. QFileDialog::ShowDirsOnly
  9. | QFileDialog::DontResolveSymlinks);
  10. QString WorkspaceName = QInputDialog::getText(this, tr("groupname"),
  11. tr("Group"), QLineEdit::Normal,
  12. "Name", &ok1);
  13. QString ProjektAnzahl = QInputDialog::getText(this, tr("Projektinput"),
  14. tr("Projektcount"), QLineEdit::Normal,
  15. "1", &ok2);
  16.  
  17. vector<string> vecProjektDateien;
  18. this->m_actualWorkSpaceFile.clear();
  19. this->m_actualWorkSpaceFile.append(dir);
  20. this->m_actualWorkSpaceFile.append("/");
  21. this->m_actualWorkSpaceFile.append(WorkspaceName);
  22. this->m_actualWorkSpaceFile.append(".ert");
  23. OrderSpace* ActualSpace = new OrderSpace(dir.toAscii().data(),
  24. WorkspaceName.toAscii().data(),
  25. ProjektAnzahl.toInt(),
  26. vecProjektDateien);
  27. tableModel = new QStandardItemModel;
  28. tableModel->setRowCount(0) ;
  29. int Max_Number_of_Columns(1);
  30. int Max_Number_of_Lines(0);
  31. tableModel->setColumnCount(Max_Number_of_Columns) ;
  32.  
  33. for (vector <string>::iterator vItr=vecProjektDateien.begin(); vItr != vecProjektDateien.end(); ++vItr)
  34. {
  35. string tstr=(*vItr).c_str();
  36. QStandardItem * item = new QStandardItem(tstr.c_str());
  37. tableModel->setItem(Max_Number_of_Lines, 0, item) ;
  38.  
  39. Max_Number_of_Lines++;
  40. }
  41.  
  42. this->myOrderView->setModel(tableModel);
  43. this->myOrderView->setAlternatingRowColors(true);
  44. this->myOrderView->resizeColumnsToContents();
  45. this->myOrderView->setEditTriggers(QAbstractItemView::NoEditTriggers);
  46.  
  47. connect(this->myOrderView, SIGNAL(clicked(const QModelIndex)), this, SLOT(GetProjectItem(const QModelIndex &)));
  48.  
  49.  
  50. }
  51.  
  52.  
  53. //**************************************************************************
  54. void MdlProjektErstellung::GetProjectItem(const QModelIndex& index)
  55. //**************************************************************************
  56. {
  57. QString str;
  58. str=tableModel->data(index,0).toString();
  59.  
  60. MdlProjektMaske* AktProjektMaske = new MdlProjektMaske(str,this->m_actualWorkSpaceFile);
  61. AktProjektMaske->show();
  62. //connect(AktProjektMaske, SIGNAL(closed()), AktProjektMaske, SLOT(deleteLater()));
  63. }
To copy to clipboard, switch view to plain text mode 

when I run newOrderSpace() my tableview fills with Item and when I click on them getProjectItem() runs. And I get my Qwidget AktProjektMaske.

The Problem now when I run newOrderSpace n times I get n QWidgets when I click on my Item on Tableview.
Whats wrong here friends??

P.S.: MdlProjektErstellung is a Widget in my QStackedWidget from Mainwindow.....