tags:

views:

33

answers:

1

Hi.,

i am new QT. i am using QTableView to display the Data.

if any cell clicked, then i need to call the event to display the row number in QMessageBox.

which event i need to use, and how to call the event?

please help me to fix the problem.

A: 

Override QTableView::currentChanged(). The row number is then available with row() from the QModelIndex object passed to currentChanged().

You may also want to override selectionChanged(). From there you can get a QList of QModelIndex objects through QItemSelection::indexes().

laalto
i tried but i did't get the output. can see see my code and give suggestion. here i attached the source project.
saravanan
@saravanan: That link just redirects to fileden.com front page.
laalto
please use this new link:http://saravanan1986.p4o.net/test4tab.zip
saravanan
Please copy paste the link in the browser
saravanan
@saravanan: can you please post what you tried? people usually don't have enough time to dig into others project.
Donotalo
i posted here. please check it. http://stackoverflow.com/questions/3878643/how-to-get-the-selected-row-number-from-frozentable-derived-from-qtableview
saravanan