Hello,

I try setWidget(), and it’s work. But there is one another Problem.
If i put:
Qt Code:
  1. tableWidget1->setItem(0,0,nameCell);
  2. tableWidget1->setItem(1,1,keyCell);
To copy to clipboard, switch view to plain text mode 
it works, but if I fill two rows:
Qt Code:
  1. tableWidget1->setItem(0,0,nameCell);
  2. tableWidget1->setItem(1,1,keyCell);
  3.  
  4. tableWidget1->setItem(2,0,nameCell);
  5. tableWidget1->setItem(3,1,keyCell);
To copy to clipboard, switch view to plain text mode 
the prog fuckt up if I close that.

Qt Code:
  1. QStringList headerLables1;
  2. headerLables1 << "Name"<< "Key";
  3.  
  4. tableWidget1 = new QTableWidget();
  5. tableWidget1->setRowCount( 10 );
  6. tableWidget1->setColumnCount( headerLables1.count() );
  7. tableWidget1->setHorizontalHeaderLabels( headerLables1 );
  8.  
  9. QTableWidgetItem *nameCell = new QTableWidgetItem( "name" );
  10. QTableWidgetItem *keyCell = new QTableWidgetItem( "key" );
  11.  
  12. tableWidget1->setItem(0,0,nameCell);
  13. tableWidget1->setItem(1,1,keyCell);
  14.  
  15. //tableWidget1->setItem(2,0,nameCell);
  16. //tableWidget1->setItem(3,1,keyCell);
  17.  
  18.  
  19.  
  20. dock = new QDockWidget(tr("Koordinaten"), this);
  21. dock->setMaximumWidth( 350 );
  22. dock->setWidget( tableWidget1 );
  23. addDockWidget(Qt::RightDockWidgetArea, dock);
To copy to clipboard, switch view to plain text mode 

//////////////////////////////
There is a Problem in QTableWidget.cpp. But i don't know what it’s mean.
Qt Code:
  1. void QTableModel::clear()
  2. {
  3. for (int i = 0; i < table.count(); ++i) {
  4. if (table.at(i)) {
  5. table.at(i)->model = 0;
  6. delete table.at(i); <---- that’s the problem
  7. table[i] = 0;
  8. }
  9. }
To copy to clipboard, switch view to plain text mode