graciano
18th August 2009, 15:33
Hi
I have a QListView associated to a QStringListModel.
void txtEdit::addChar()
{
QString testChar("x");
int row = m_ui->usedList->currentIndex().row() + 1;
usedListModel->insertRows(row, 1);
QModelIndex index = usedListModel->index(row);
m_ui->usedList->setCurrentIndex(index);
m_ui->usedList->edit(index);
}
Line 8 allows me to type the content inside the QListView.
Could't find a way to write testChar instead of editing the item!
Where showld i look to find the solution for this?
Thanks
I have a QListView associated to a QStringListModel.
void txtEdit::addChar()
{
QString testChar("x");
int row = m_ui->usedList->currentIndex().row() + 1;
usedListModel->insertRows(row, 1);
QModelIndex index = usedListModel->index(row);
m_ui->usedList->setCurrentIndex(index);
m_ui->usedList->edit(index);
}
Line 8 allows me to type the content inside the QListView.
Could't find a way to write testChar instead of editing the item!
Where showld i look to find the solution for this?
Thanks