Thank you very much for response, but i have still this error. When I run this function I see in qt error like this:
ASSERT: "!isEmpty()" in file c:\QtSDK\Desktop\Qt\4.7.3\mingw\include/QtCore/qlist.h, line 273
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
When i read your response I modify my code and i have this:
QModelIndexList selectionL = selectionM->selectedIndexes();
selectionL.removeFirst();
foreach ( const QModelIndex& index, selectionL)
{
list = index.data().toStringList() ;
}
copy =list.join(", ");
QString copy;
QStringList list;
QItemSelectionModel *selectionM = ui->tableView->selectionModel();
QModelIndexList selectionL = selectionM->selectedIndexes();
selectionL.removeFirst();
foreach ( const QModelIndex& index, selectionL)
{
list = index.data().toStringList() ;
}
copy =list.join(", ");
QMessageBox::information(this, "Kopiowanie", copy);
To copy to clipboard, switch view to plain text mode
This error results from "selectionL.removeFirst();" but when i removed this line i don't have a char in QString. Sorry for my language but I live in Poland.
Bookmarks