Hi,

I have a problem. I don't know how to get the access to item and it index after drag and drop event. I created a connection between signal and slot but item data are invalid. To be specific in this function: rowsInserted(QModelIndex,int,int) first variable is invalid. How to get access to valid data?
Qt Code:
  1. connect(ui->lwSunday->model(), SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(ItemInserted(QModelIndex,int,int)));
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. void MainWindow::ItemInserted(const QModelIndex &parent, int first, int /*last*/)
  2. {
  3. QString text = parent->data(Qt::DisplayRole).toString(); // text is "" why?
  4. }
To copy to clipboard, switch view to plain text mode 

Can you help me?

P.S. Sorry for my poor language skills.