How to get column Count if i have only the QModelIndex
-
Hi
i like to get the column count of selected row , now i have slot function that connected to the click() signal
i can get the selected QStandardItem using QStandardItemModel itemFromIndex method .
but how can i get the count of the column's in the selected row ?
also how can i get the selected row index ?
Thanks -
@model->columnCount(index.parent());@
-
Thanks allot , just one problem ... how do i know the selected row index ?
): -
if you only have the index, ypou can also write:
@
index.model()->columnCount(index.parent());
int nRow = index.row();
@A look to the documentation would help: "QModelIndex":http://doc.qt.nokia.com/4.7/qmodelindex.html