C++ (Qt)public slots: void cl_tl([b]const QModelIndex &index[/b]); ....QObject::connect(ui->MyList, SIGNAL(clicked(QModelIndex)), this, SLOT(cl_tl(QModelIndex)));....void Proga::cl_tl([b]const QModelIndex &index[/b]){ QString t = index->data([b]Qt::DisplayRole[/b]).toString(); ui->Name>setText(t);}
QString t = index->data(Qt::DisplayRole).toString();
QString t = index.data(Qt::DisplayRole).toString();