<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to delete an item in QTreeWidget?]]></title><description><![CDATA[<p dir="auto">Hello, I searched the tree and found an item. I want to delete it.</p>
<pre><code>QList&lt;QTreeWidgetItem*&gt; s = ui-&gt;DeckList-&gt;findItems(ui-&gt;CardList-&gt;item(row, 0)-&gt;text(),
                                                    Qt::MatchFlag::MatchExactly, 1);
</code></pre>
<p dir="auto">First I tried delete s.constFirst(); but the program just crashed.</p>
<p dir="auto">Then I tried</p>
<pre><code>        QTreeWidgetItem *item = s.constFirst();
        uint16_t row = ui-&gt;DeckList-&gt;indexFromItem(item, 1).row();
        ui-&gt;DeckList-&gt;topLevelItem(row);
</code></pre>
<p dir="auto">But it won't pass.</p>
<p dir="auto">C:\Qt\5.10.1\mingw53_32\include\QtWidgets\qtreewidget.h:368: error: 'QModelIndex QTreeWidget::indexFromItem(QTreeWidgetItem*, int) const' is protected<br />
QModelIndex indexFromItem(QTreeWidgetItem *item, int column = 0) const; // ### Qt 6: remove</p>
<p dir="auto">What should I do?</p>
]]></description><link>https://forum.qt.io/topic/90489/how-to-delete-an-item-in-qtreewidget</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 06:55:41 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/90489.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 May 2018 00:33:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Tue, 08 May 2018 08:17:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vronin">@<bdi>VRonin</bdi></a> said in <a href="/post/456911">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a> said in <a href="/post/456906">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">I want them to  be in the same vertical position.</p>
</blockquote>
<p dir="auto">Just set <a href="http://doc.qt.io/qt-5/qtreeview.html#indentation-prop" target="_blank" rel="noopener noreferrer nofollow ugc">indentation</a> to 0</p>
</blockquote>
<p dir="auto">This is working!!! Many thanks!!!</p>
]]></description><link>https://forum.qt.io/post/456926</link><guid isPermaLink="true">https://forum.qt.io/post/456926</guid><dc:creator><![CDATA[MasterBlade]]></dc:creator><pubDate>Tue, 08 May 2018 08:17:56 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Tue, 08 May 2018 07:24:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a> said in <a href="/post/456906">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">I want them to  be in the same vertical position.</p>
</blockquote>
<p dir="auto">Just set <a href="http://doc.qt.io/qt-5/qtreeview.html#indentation-prop" target="_blank" rel="noopener noreferrer nofollow ugc">indentation</a> to 0</p>
]]></description><link>https://forum.qt.io/post/456911</link><guid isPermaLink="true">https://forum.qt.io/post/456911</guid><dc:creator><![CDATA[VRonin]]></dc:creator><pubDate>Tue, 08 May 2018 07:24:08 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Tue, 08 May 2018 07:13:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a><br />
It is not possible. 2 001_007 is a child MDeck. You can add only topLevelItems.</p>
]]></description><link>https://forum.qt.io/post/456907</link><guid isPermaLink="true">https://forum.qt.io/post/456907</guid><dc:creator><![CDATA[Taz742]]></dc:creator><pubDate>Tue, 08 May 2018 07:13:17 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Tue, 08 May 2018 07:10:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/taz742">@<bdi>Taz742</bdi></a> said in <a href="/post/456884">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a><br />
I dont understood whats wrong this picture. Can you post a image what you want exactly?</p>
</blockquote>
<p dir="auto">The '2' in the first column are not aligning. I want them to  be in the same vertical position.</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/a88c02a4-65cb-4e10-b913-560a1d81b822.PNG" alt="0_1525763326310_1.PNG" class=" img-fluid img-markdown" /><br />
<img src="https://ddgobkiprc33d.cloudfront.net/34eaad27-6eb9-44d6-b4f3-27af97ba79fb.png" alt="1_1525763326310_2.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/456906</link><guid isPermaLink="true">https://forum.qt.io/post/456906</guid><dc:creator><![CDATA[MasterBlade]]></dc:creator><pubDate>Tue, 08 May 2018 07:10:08 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Tue, 08 May 2018 05:27:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a><br />
I dont understood whats wrong this picture. Can you post a image what you want exactly?</p>
]]></description><link>https://forum.qt.io/post/456884</link><guid isPermaLink="true">https://forum.qt.io/post/456884</guid><dc:creator><![CDATA[Taz742]]></dc:creator><pubDate>Tue, 08 May 2018 05:27:41 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Tue, 08 May 2018 00:35:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/taz742">@<bdi>Taz742</bdi></a> said in <a href="/post/456764">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a><br />
You dont solve this problem <a href="https://forum.qt.io/topic/90460/why-is-there-a-space-in-qtreewidget">https://forum.qt.io/topic/90460/why-is-there-a-space-in-qtreewidget</a> here? Why is a marked solved?</p>
</blockquote>
<p dir="auto">It was solved because I didn't add any children. As you see in the pic, the first row (MDeck) is good, but its child (001_007) has that problem. Should I reopen that ticket and ask there?</p>
]]></description><link>https://forum.qt.io/post/456876</link><guid isPermaLink="true">https://forum.qt.io/post/456876</guid><dc:creator><![CDATA[MasterBlade]]></dc:creator><pubDate>Tue, 08 May 2018 00:35:04 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 10:48:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a><br />
You dont solve this problem <a href="https://forum.qt.io/topic/90460/why-is-there-a-space-in-qtreewidget">https://forum.qt.io/topic/90460/why-is-there-a-space-in-qtreewidget</a> here? Why is a marked solved?</p>
]]></description><link>https://forum.qt.io/post/456764</link><guid isPermaLink="true">https://forum.qt.io/post/456764</guid><dc:creator><![CDATA[Taz742]]></dc:creator><pubDate>Mon, 07 May 2018 10:48:03 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 10:40:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/taz742">@<bdi>Taz742</bdi></a> said in <a href="/post/456737">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">Also its deleted correctly and I dont have program crash.</p>
</blockquote>
<p dir="auto">Oh I'm sorry it's my fault. I'm still using item after deleting it.</p>
<p dir="auto">I have one more problem. I'm making children now. But they don't seem to be aligning. Is there a way to remove those spaces before them?<br />
<img src="https://ddgobkiprc33d.cloudfront.net/7a769301-882f-46de-958f-27ca51c3a6fa.PNG" alt="0_1525689613744_1.PNG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/456762</link><guid isPermaLink="true">https://forum.qt.io/post/456762</guid><dc:creator><![CDATA[MasterBlade]]></dc:creator><pubDate>Mon, 07 May 2018 10:40:48 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 09:11:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a> said in <a href="/post/456733">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">Actually this is a very simple tree and no item has any children at all.</p>
</blockquote>
<p dir="auto">If you have only topLevelItems you dont need</p>
<pre><code>QTreeWidgetItem *parent= item-&gt;parent();
</code></pre>
<p dir="auto">I created a test, in my constructor add a 3 parent like this:</p>
<pre><code>    ui-&gt;treeWidget-&gt;addTopLevelItem(new QTreeWidgetItem(QStringList() &lt;&lt; "parent"));
    ui-&gt;treeWidget-&gt;addTopLevelItem(new QTreeWidgetItem(QStringList() &lt;&lt; "parent 1"));
    ui-&gt;treeWidget-&gt;addTopLevelItem(new QTreeWidgetItem(QStringList() &lt;&lt; "parent 2"));
</code></pre>
<p dir="auto">okay.. I have 3 topLevelITem "parent", "parent 1" and "parent 2".</p>
<pre><code>void MainWindow::on_pushButton_clicked()
{
    QList&lt;QTreeWidgetItem*&gt; s = ui-&gt;treeWidget-&gt;findItems("parent", Qt::MatchFlag::MatchExactly, 0);

    qDebug() &lt;&lt; s.size(); // == 1 Because I have a only one topLevelItem which name is"parent".

    delete s.constFirst();
}
</code></pre>
<p dir="auto">my topLevelItem(0) is deleted. I dont have program crash.</p>
<p dir="auto">Now i have a 2 topLevelItem named "parent 1" and "parent 2", now try to find a items witch contains "parent" with Qt::MatchContains flag.</p>
<pre><code>void MainWindow::on_pushButton_2_clicked()
{
    QList&lt;QTreeWidgetItem*&gt; s = ui-&gt;treeWidget-&gt;findItems("parent", Qt::MatchContains, 0);

    qDebug() &lt;&lt; s.size(); // == 2, Because topLevelItem "parent 1" and "parent 2" contains string "parent".

    foreach (QTreeWidgetItem *item, s) {
        delete item;
    }
}
</code></pre>
<p dir="auto">Also its deleted correctly and I dont have program crash.</p>
]]></description><link>https://forum.qt.io/post/456737</link><guid isPermaLink="true">https://forum.qt.io/post/456737</guid><dc:creator><![CDATA[Taz742]]></dc:creator><pubDate>Mon, 07 May 2018 09:11:41 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 07:51:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/taz742">@<bdi>Taz742</bdi></a> said in <a href="/post/456723">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a> said in <a href="/post/456709">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">First I tried delete s.constFirst(); but the program just crashed.</p>
</blockquote>
<p dir="auto">First of all, why did this problem happen? Search it.<br />
<strong>Note:</strong> If you delete a parent all its child will be deleted. Maybe you are using this item or this childrens somewhere?</p>
</blockquote>
<p dir="auto">I tried but found no relating result.<br />
Actually this is a very simple tree and no item has any children at all.<br />
Could you give me an example on deleting an item from searching?</p>
<blockquote>
<p dir="auto">Also are you sure</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a> said in <a href="/post/456709">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">QList&lt;QTreeWidgetItem*&gt; s = ui-&gt;DeckList-&gt;findItems(ui-&gt;CardList-&gt;item(row, 0)-&gt;text(),<br />
Qt::MatchFlag::MatchExactly, 1);</p>
</blockquote>
<p dir="auto">s is non empty list ?<br />
As documentation says <a href="http://doc.qt.io/qt-5/qlist.html#constFirst" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qlist.html#constFirst</a></p>
<pre><code>Returns a reference to the last item in the list. The list must not be empty. If the list can be empty, call isEmpty() before calling this function.

This function was introduced in Qt 5.6.
</code></pre>
</blockquote>
<p dir="auto">Well actually I tested if s is empty or not. But as it's not important here I just delete it on this forum to make things more clear. The whole function looks like this.</p>
<p dir="auto">I want to deduct the number(a value) of the item by one. If the number is already 1 before calling this function, remove it instead.</p>
<pre><code>void Deck::RMD(int row)
{
    QList&lt;QTreeWidgetItem*&gt; s = ui-&gt;DeckList-&gt;findItems(ui-&gt;CardList-&gt;item(row, 0)-&gt;text(),
                                                        Qt::MatchFlag::MatchExactly, 1);
    if (s.isEmpty()){
        qDebug("Can't find the card on Deck::RMD");
        return;
    }
    else{
        uint8_t no = s.constFirst()-&gt;text(0).toUInt();
        if (no == 1){
            QTreeWidgetItem *item = s.constFirst();
            QTreeWidgetItem *parent= item-&gt;parent();
            uint16_t row = ui-&gt;DeckList-&gt;indexFromItem(item, 1).row();
            ui-&gt;DeckList-&gt;topLevelItem(row);
            delete item;
            item = NULL;
            if (parent != NULL &amp;&amp; parent-&gt;childCount() == 0){
                delete parent;
                parent = NULL;
            }
        }
        else{
            s.constFirst()-&gt;setText(0, QString::number(no - 1));
        }
    }
}
</code></pre>
]]></description><link>https://forum.qt.io/post/456733</link><guid isPermaLink="true">https://forum.qt.io/post/456733</guid><dc:creator><![CDATA[MasterBlade]]></dc:creator><pubDate>Mon, 07 May 2018 07:51:20 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 06:58:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a><br />
What if it does not have a parent?</p>
]]></description><link>https://forum.qt.io/post/456726</link><guid isPermaLink="true">https://forum.qt.io/post/456726</guid><dc:creator><![CDATA[Taz742]]></dc:creator><pubDate>Mon, 07 May 2018 06:58:13 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 06:48:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> said in <a href="/post/456715">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">You're looking for removeChild: <a href="http://doc.qt.io/qt-5/qtreewidgetitem.html#removeChild" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qtreewidgetitem.html#removeChild</a></p>
</blockquote>
<p dir="auto">So I need to find his parent and then delete him as a child?</p>
]]></description><link>https://forum.qt.io/post/456724</link><guid isPermaLink="true">https://forum.qt.io/post/456724</guid><dc:creator><![CDATA[MasterBlade]]></dc:creator><pubDate>Mon, 07 May 2018 06:48:17 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 07:06:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a> said in <a href="/post/456709">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">First I tried delete s.constFirst(); but the program just crashed.</p>
</blockquote>
<p dir="auto">First of all, why did this problem happen? Search it.<br />
<strong>Note:</strong> If you delete a parent all its child will be deleted. Maybe you are using this item or this childrens somewhere?</p>
<p dir="auto">Also are you sure</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a> said in <a href="/post/456709">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">QList&lt;QTreeWidgetItem*&gt; s = ui-&gt;DeckList-&gt;findItems(ui-&gt;CardList-&gt;item(row, 0)-&gt;text(),<br />
Qt::MatchFlag::MatchExactly, 1);</p>
</blockquote>
<p dir="auto">s is non empty list ?<br />
As documentation says <a href="http://doc.qt.io/qt-5/qlist.html#constFirst" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qlist.html#constFirst</a></p>
<pre><code>Returns a reference to the last item in the list. The list must not be empty. If the list can be empty, call isEmpty() before calling this function.

This function was introduced in Qt 5.6.
</code></pre>
]]></description><link>https://forum.qt.io/post/456723</link><guid isPermaLink="true">https://forum.qt.io/post/456723</guid><dc:creator><![CDATA[Taz742]]></dc:creator><pubDate>Mon, 07 May 2018 07:06:58 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 04:28:32 GMT]]></title><description><![CDATA[<p dir="auto">You're looking for removeChild: <a href="http://doc.qt.io/qt-5/qtreewidgetitem.html#removeChild" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qtreewidgetitem.html#removeChild</a></p>
]]></description><link>https://forum.qt.io/post/456715</link><guid isPermaLink="true">https://forum.qt.io/post/456715</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Mon, 07 May 2018 04:28:32 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 03:41:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fuel-0">@<bdi>Fuel-0</bdi></a> said in <a href="/post/456712">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">maybe just</p>
<pre><code>ui-&gt;DeckList-&gt;removeRow(s.row());
</code></pre>
<p dir="auto">try this to remove a row.</p>
<p dir="auto">take a look at this <a href="http://doc.qt.io/qt-5/qabstractitemmodel.html#removeRows" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qabstractitemmodel.html#removeRows</a></p>
</blockquote>
<p dir="auto">But my problem is that I can't get the row# by</p>
<pre><code>    uint16_t row = ui-&gt;DeckList-&gt;indexFromItem(item, 1).row();
</code></pre>
<p dir="auto">because QModelIndex QTreeWidget::indexFromItem(QTreeWidgetItem*, int) const' is protected.</p>
]]></description><link>https://forum.qt.io/post/456713</link><guid isPermaLink="true">https://forum.qt.io/post/456713</guid><dc:creator><![CDATA[MasterBlade]]></dc:creator><pubDate>Mon, 07 May 2018 03:41:08 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 01:39:10 GMT]]></title><description><![CDATA[<p dir="auto">maybe just</p>
<pre><code>ui-&gt;DeckList-&gt;removeRow(s.row());
</code></pre>
<p dir="auto">try this to remove a row.</p>
<p dir="auto">take a look at this <a href="http://doc.qt.io/qt-5/qabstractitemmodel.html#removeRows" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.io/qt-5/qabstractitemmodel.html#removeRows</a></p>
]]></description><link>https://forum.qt.io/post/456712</link><guid isPermaLink="true">https://forum.qt.io/post/456712</guid><dc:creator><![CDATA[Fuel 0]]></dc:creator><pubDate>Mon, 07 May 2018 01:39:10 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 01:25:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fuel-0">@<bdi>Fuel-0</bdi></a> said in <a href="/post/456710">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a> said in <a href="/post/456709">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">uint16_t row = ui-&gt;DeckList-&gt;indexFromItem(item, 1).row();</p>
</blockquote>
<p dir="auto">do you really need .row() at the end?</p>
</blockquote>
<p dir="auto">I need row# to locate the item for ui-&gt;DeckList-&gt;topLevelItem(row);</p>
<p dir="auto">Do you have a better suggestion?</p>
]]></description><link>https://forum.qt.io/post/456711</link><guid isPermaLink="true">https://forum.qt.io/post/456711</guid><dc:creator><![CDATA[MasterBlade]]></dc:creator><pubDate>Mon, 07 May 2018 01:25:49 GMT</pubDate></item><item><title><![CDATA[Reply to How to delete an item in QTreeWidget? on Mon, 07 May 2018 01:00:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/masterblade">@<bdi>MasterBlade</bdi></a> said in <a href="/post/456709">How to delete an item in QTreeWidget?</a>:</p>
<blockquote>
<p dir="auto">uint16_t row = ui-&gt;DeckList-&gt;indexFromItem(item, 1).row();</p>
</blockquote>
<p dir="auto">do you really need .row() at the end?</p>
]]></description><link>https://forum.qt.io/post/456710</link><guid isPermaLink="true">https://forum.qt.io/post/456710</guid><dc:creator><![CDATA[Fuel 0]]></dc:creator><pubDate>Mon, 07 May 2018 01:00:37 GMT</pubDate></item></channel></rss>