bailong
18th July 2010, 16:53
hi all, I used "setIndexWidget" to add a QPushButton into a column of QTreeView, and that was fine.
just like this:
m_pTreeView->setIndexWidget(m_pModel->index(irow, 4), pButton);
but, when I addd the filter function, and used it, like this:
m_pTreeView->seIndexWiget(m_pFilterModel->mapFormSource(m_pModel->indexi(row, 4), pbutton);
and then I input some character into the lineEdit to filter the items, and all buttons in column 4 were gone !
the buttons disappeared !
so I don't know Why , thank you for your help!
just like this:
m_pTreeView->setIndexWidget(m_pModel->index(irow, 4), pButton);
but, when I addd the filter function, and used it, like this:
m_pTreeView->seIndexWiget(m_pFilterModel->mapFormSource(m_pModel->indexi(row, 4), pbutton);
and then I input some character into the lineEdit to filter the items, and all buttons in column 4 were gone !
the buttons disappeared !
so I don't know Why , thank you for your help!