How to display selected row from a qtableview in annother one
-
wrote on 5 Jun 2019, 15:13 last edited by aha_1980 6 May 2019, 17:11
Hi...! Please i want to display the selected row from second tableview in the first qtableview.I mean,the first window have a tableview and buttons ,so when you click on the button it open a second window containing the second qtablview displaying database contents.
My problem is that I don't know how to display in the first qtableview the row i selected in the second one.
i tried using selectedindexes() to take the index but don't know exactly how to call it in the first window's class.
Thanks for helping me -
wrote on 5 Jun 2019, 15:17 last edited by
Something like this? https://api.kde.org/frameworks/kitemmodels/html/classKSelectionProxyModel.html
-
wrote on 5 Jun 2019, 15:28 last edited by
Yes something like that.......!!!!
-
wrote on 5 Jun 2019, 15:44 last edited by
But in my case i got two different windows (a QTabwidget button which open a QDialog),so you select in the QDialog and display the selected one in QTabwidget
-
Hi,
You can pass the selection model to your dialog and create the proxy there.
3/6