ui.listWidget->insertItem(row, item);
ui.listWidget->insertItem(row, item);
To copy to clipboard, switch view to plain text mode
This will delete the original one! You have to swap the values! Like (not optimized):
Take item a in a
Take item b in b
insert a in the row of b
insert b in the row of a
Take item a in a
Take item b in b
insert a in the row of b
insert b in the row of a
To copy to clipboard, switch view to plain text mode
if you call
ui.listWidget->setCurrentItem(item);
ui.listWidget->setCurrentItem(item);
To copy to clipboard, switch view to plain text mode
then
ui.
listWidget->selectionModel
()->select
(ui.
listWidget->currentIndex
(),
QItemSelectionModel::Select);
ui.listWidget->selectionModel()->select(ui.listWidget->currentIndex(), QItemSelectionModel::Select);
To copy to clipboard, switch view to plain text mode
is not necessary.
Bookmarks