Venkata Narsi Reddy Vaddula Venkata Narsi Reddy Vaddula - 1 month ago 24
Python Question

Copy/Paste multiple items from QTableView in pyqt4?

We can select multiple items(partial rows and partial columns) from QTableView using

self.tableView.setSelectionMode(QAbstractItemView.ExtendedSelection)
, but after selecting some rows and columns(partial) if I do CTRL+C and paste it in notepad it only pastes one item(element of table)?

How can we do copy and paste multiple items?

Answer

The self.tableView.setSelectionMode(QAbstractItemView.ExtendedSelection) must be working did you look at the permissions provided for the file, how are you opening your file with just "r"(read) them it might not work.