[Qt-interest] weird QTableItem behavior

Andrei Sebastian Cimpean andreiamenta at gmail.com
Fri Sep 11 16:13:02 CEST 2009


On Friday 11 September 2009 04:56:16 pm R. Reucher wrote:
> On Fri, 11 Sep 2009 16:36:47 +0300, Andrei Sebastian Cimpean wrote:
> > QList<QTreeWidgetItem* >items = m_ui->treeWidget->findItems("/",
> > Qt::MatchRecursive | Qt::MatchExactly,0); QList<QTreeWidgetItem*
> >
> > >selectedShit = m_ui->treeWidget->selectedItems();
> >
> > selectedShit[0]->setSelected(false);
> > delete selectedShit[0];
> 
> ^^^ I'm really not sure I can follow on what you want to do, but THIS
> isn't a good idea. If you really want to remove the first selected item,
> use takeItem() first, then delete it.
> 
> HTH, René
> 
Thanks for the prompt help René. It is very possible that i explained very 
badly what my problem was.

http://img132.imageshack.us/content.php?page=done&l=img132/571/snapshot1d.png
everything works i can navigate in this case, but when i am inside a parent 
and navigate back i can't re-enter in that position via double clicking table 
item(seen in screenshot below)
http://img132.imageshack.us/content.php?page=done&l=img132/9260/snapshot2o.png
i think that one solution might be to somehow reset the item?! i don't know... 
it only does this to items that go through this process :(

Thanks again for the help, maybe this pictures will help you help me :P.




More information about the Qt-interest-old mailing list