[Qt-interest] QTreeWidgetItem test if findItems exists

R. Reucher rene.reucher at batcom-it.net
Mon Sep 14 09:15:58 CEST 2009


On Mon, 14 Sep 2009 07:06:33 +0000, R. Reucher wrote:

> On Sun, 13 Sep 2009 12:07:40 +0300, Andrei Sebastian Cimpean wrote:
>> QList<QTreeWidgetItem* >items =
>> m_ui->treeWidget->findItems(oPRepl.at(j), Qt::MatchRecursive |
>> Qt::MatchExactly,0);
>> [...]
>> how to check if an item with that name exists or is null ?
> If items->count() is 0, there were no items in the QTreeView that
> matched your query string (exactly).
Sorry, this must read "items.count()" -- and it's a QTreeWidget, not a 
QTreeView, of course :)...
-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/



More information about the Qt-interest-old mailing list