<?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[Drag &amp; Drop event end]]></title><description><![CDATA[<p dir="auto">Hi Folks,</p>
<p dir="auto">I have a small application, where I'm using QTableView with QStandardItemModel. I enabled the drag &amp; drop whithin the table.<br />
My problem is, that I couldn't find an lightweight, stange-forward way to detect the exact finish of drag &amp; drop, when the model is in the final state, which is visible for the user.</p>
<p dir="auto">Can anybody tell me, how should I catch this?</p>
<p dir="auto">Regards,<br />
Nobert</p>
]]></description><link>https://forum.qt.io/topic/48148/drag-drop-event-end</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 07:11:35 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/48148.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Nov 2014 08:53:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Drag &amp; Drop event end on Wed, 26 Nov 2014 21:38:31 GMT]]></title><description><![CDATA[<p dir="auto">@<br />
QTableView *tableWidget = new QTableView;<br />
QStandardItemModel *itemModel = new QStandardItemModel;<br />
tableWidget-&gt;setModel(itemModel);</p>
<pre><code>itemModel-&gt;setColumnCount(4);
itemModel-&gt;setRowCount(5);

for (int col = 0 ; col &lt; itemModel-&gt;columnCount() ; ++col) {
    for (int row = 0 ; row &lt; itemModel-&gt;rowCount() ; ++row) {
        QStandardItem *item = new QStandardItem(tr("Test %1 %2").arg(col).arg(row));
        itemModel-&gt;setItem(row, col, item);
    }
}

tableWidget-&gt;horizontalHeader()-&gt;setSectionsMovable(true);
tableWidget-&gt;verticalHeader()-&gt;setSectionsMovable(true);
</code></pre>
<p dir="auto">@</p>
<p dir="auto">With that you can move rows up and down and columns left to right</p>
]]></description><link>https://forum.qt.io/post/252445</link><guid isPermaLink="true">https://forum.qt.io/post/252445</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 26 Nov 2014 21:38:31 GMT</pubDate></item><item><title><![CDATA[Reply to Drag &amp; Drop event end on Thu, 20 Nov 2014 07:53:07 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I checked your suggestion, and I tried out with the following code:<br />
@<br />
view-&gt;horizontalHeader()-&gt;setSectionsMovable(true);<br />
view-&gt;verticalHeader()-&gt;setSectionsMovable(true);</p>
<pre><code>connect(view-&gt;horizontalHeader(),   &amp;QHeaderView::sectionMoved, [this](int, int, int) {qDebug() &lt;&lt; "horizontal";});
connect(view-&gt;verticalHeader(),     &amp;QHeaderView::sectionMoved, [this](int, int, int) {qDebug() &lt;&lt; "vertical";});
</code></pre>
<p dir="auto">@</p>
<p dir="auto">but nothing was happening.<br />
could you provide me some code example, how should I use the headerView?</p>
<p dir="auto">Regards,<br />
Nobert</p>
<p dir="auto">can Anybody help me?</p>
]]></description><link>https://forum.qt.io/post/251665</link><guid isPermaLink="true">https://forum.qt.io/post/251665</guid><dc:creator><![CDATA[moravas]]></dc:creator><pubDate>Thu, 20 Nov 2014 07:53:07 GMT</pubDate></item></channel></rss>