<?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[QListWidget drag indicator not showing]]></title><description><![CDATA[<p dir="auto">Hello, I have a simple list widget, and have following drag drop settings:<br />
setDragEnabled(true);<br />
setIconSize(QSize(m_PieceSize, m_PieceSize));<br />
setAcceptDrops(true);<br />
setDropIndicatorShown(true);<br />
setDefaultDropAction(Qt::MoveAction);</p>
<p dir="auto">But when drag an item and move inside list view, there is no drag indicator showing(no line/rectangle drawn on where dragging item will be dropped), what is the problem?</p>
<p dir="auto">Thanks in advance.</p>
]]></description><link>https://forum.qt.io/topic/132179/qlistwidget-drag-indicator-not-showing</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 20:01:53 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/132179.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Nov 2021 00:53:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QListWidget drag indicator not showing on Tue, 23 Nov 2021 08:38:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a>  Thanks for reply.<br />
I have read this  Using Drag and Drop with Item Views document carefully, but the method it metioned just not working.<br />
I have changed code to follow:<br />
setDragEnabled(true);<br />
setAcceptDrops(true);<br />
setDropIndicatorShown(true);<br />
setDefaultDropAction(Qt::MoveAction);<br />
this-&gt;setDragDropMode(QAbstractItemView::InternalMove);<br />
this-&gt;viewport()-&gt;setAcceptDrops(true);</p>
<p dir="auto">But it still no change, when I drag item, I can see a black dot drawn on top left corner of list view:<br />
<img src="https://ddgobkiprc33d.cloudfront.net/1267b4f4-d962-44c5-b79e-2ffb897e408d.png" alt="887067a6-479d-4169-b563-41d6b79f7731-image.png" class=" img-fluid img-markdown" /><br />
But not fully drawn as line and rectangle which encapsulate list items.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> Is there any simple example project to showcase drag and drop indicator works?</p>
]]></description><link>https://forum.qt.io/post/691134</link><guid isPermaLink="true">https://forum.qt.io/post/691134</guid><dc:creator><![CDATA[Leon Zhang]]></dc:creator><pubDate>Tue, 23 Nov 2021 08:38:08 GMT</pubDate></item><item><title><![CDATA[Reply to QListWidget drag indicator not showing on Mon, 22 Nov 2021 08:19:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/leon-zhang">@<bdi>Leon-Zhang</bdi></a><br />
Did you read through <a href="https://doc.qt.io/qt-5/model-view-programming.html#using-drag-and-drop-with-item-views" target="_blank" rel="noopener noreferrer nofollow ugc">Using Drag and Drop with Item Views</a>?  Try the examples there, e.g. maybe you need <code>listWidget-&gt;setDragDropMode(QAbstractItemView::InternalMove);</code> or the other code shown there.</p>
]]></description><link>https://forum.qt.io/post/691080</link><guid isPermaLink="true">https://forum.qt.io/post/691080</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Mon, 22 Nov 2021 08:19:45 GMT</pubDate></item></channel></rss>