<?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[Muti Selection in PyQt6?]]></title><description><![CDATA[<p dir="auto">I have these following which work in PyQt5 for QtTreeWidget<br />
self.setSelectionMode(self.ExtendedSelection)<br />
self.sortByColumn(1,Qt.Qt.AscendingOrder)</p>
<p dir="auto">Are those obsolete in PyQt6? What should I use for replacements.</p>
]]></description><link>https://forum.qt.io/topic/146741/muti-selection-in-pyqt6</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Nov 2026 11:09:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/146741.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Jul 2023 23:49:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Muti Selection in PyQt6? on Tue, 18 Jul 2023 17:57:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bebewinla">@<bdi>bebewinla</bdi></a><br />
As I suggested, the enumerated type namespaces have changed, you need to use the correct ones in PyQt6.</p>
<p dir="auto">Also I don't think it's usual to access a enumerated value via <code>self</code>, e.g. like <code>self.ExtendedSelection</code>,   I don't know whether Python allows this.</p>
]]></description><link>https://forum.qt.io/post/765333</link><guid isPermaLink="true">https://forum.qt.io/post/765333</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 18 Jul 2023 17:57:46 GMT</pubDate></item><item><title><![CDATA[Reply to Muti Selection in PyQt6? on Tue, 18 Jul 2023 15:21:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a></p>
<p dir="auto">I got this error :<br />
self.setSelectionMode(self.ExtendedSelection)<br />
AttributeError: 'Table' object has no attribute 'ExtendedSelection'</p>
<p dir="auto">where Table is a QtTreeWidget.<br />
So I tried  the following:<br />
self.setSelectionMode(self.selectionMode.MultiSelection)<br />
and it doesn't like it either. See error below</p>
<p dir="auto">self.setSelectionMode(self.selectionMode.MultiSelection)<br />
AttributeError: 'builtin_function_or_method' object has no attribute 'MultiSelection'</p>
]]></description><link>https://forum.qt.io/post/765326</link><guid isPermaLink="true">https://forum.qt.io/post/765326</guid><dc:creator><![CDATA[bebewinla]]></dc:creator><pubDate>Tue, 18 Jul 2023 15:21:59 GMT</pubDate></item><item><title><![CDATA[Reply to Muti Selection in PyQt6? on Tue, 18 Jul 2023 07:08:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bebewinla">@<bdi>bebewinla</bdi></a><br />
Both of the methods are just as available in [Py]Qt6 as they were in [Py]Qt5.  [Though PySide6 does not seem to document <code>QTreeWidget.setSelectionModel()</code>, but I don't see why it should not be there.]</p>
<p dir="auto">However, I see these two statements each pass a Qt enumerated type value (<code>self.ExtendedSelection</code>, <code>Qt.Qt.AscendingOrder</code>).  Could it be on those tokens that you are getting an error message? ISTR that at PyQt6/PySide6 such enum values which were in the global <code>Qt</code> namespace have been moved down into a more specific namespace.  So <code>Qt.AscendingOrder</code> needs to become <em>something like</em> <code>Qt.SortOrder.AscendingOrder</code>.  I don't know where you look up what these got changed to, and I am not even sure that the PySide6 documentation tells you, but you have to find out somehow....</p>
]]></description><link>https://forum.qt.io/post/765240</link><guid isPermaLink="true">https://forum.qt.io/post/765240</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 18 Jul 2023 07:08:17 GMT</pubDate></item><item><title><![CDATA[Reply to Muti Selection in PyQt6? on Tue, 18 Jul 2023 05:14:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bebewinla">@<bdi>bebewinla</bdi></a> said in <a href="/post/765213">Muti Selection in PyQt6?</a>:</p>
<blockquote>
<p dir="auto">Are those obsolete in PyQt6?</p>
</blockquote>
<p dir="auto">Don't know. You did not say what the problem is...</p>
]]></description><link>https://forum.qt.io/post/765228</link><guid isPermaLink="true">https://forum.qt.io/post/765228</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Tue, 18 Jul 2023 05:14:34 GMT</pubDate></item></channel></rss>