<?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 do I change the password field to show &quot;******&quot; in table widget]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I am trying to show user name and password in table widget that table is editable, so while giving input for password, I want to change string as "*******" it's possible to do.</p>
]]></description><link>https://forum.qt.io/topic/119891/how-do-i-change-the-password-field-to-show-in-table-widget</link><generator>RSS for Node</generator><lastBuildDate>Sat, 25 Apr 2026 13:01:43 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/119891.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Oct 2020 10:17:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How do I change the password field to show &quot;******&quot; in table widget on Tue, 13 Oct 2020 18:36:47 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I would go with a custom QStyledItemDelegate that provides a QLineEdit with the adequate echo mode.</p>
<p dir="auto">Note that from a security point of view, the password shall be immediately encrypted and not stored as is.</p>
]]></description><link>https://forum.qt.io/post/622079</link><guid isPermaLink="true">https://forum.qt.io/post/622079</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 13 Oct 2020 18:36:47 GMT</pubDate></item><item><title><![CDATA[Reply to How do I change the password field to show &quot;******&quot; in table widget on Tue, 13 Oct 2020 12:38:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/yashi95">@<bdi>yashi95</bdi></a><br />
I don't know/think that you can change a <code>QTableWidget</code>'s editor to what you want.  You can for a <code>QTableView</code>, as per this old post from 2007 (! still valid) <a href="https://www.qtcentre.org/threads/7678-QTableWidget-editItem-how-to-get-pointer-to-the-editor?p=41223#post41223:" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.qtcentre.org/threads/7678-QTableWidget-editItem-how-to-get-pointer-to-the-editor?p=41223#post41223:</a></p>
<blockquote>
<p dir="auto">You cannot obtain it from a QTableWidget.</p>
<p dir="auto">Use a QTableView instead and create the editor with the default item delegate, using:</p>
<p dir="auto">QAbstractItemView::itemDelegate and QAbstractItemDelegate::createEditor.</p>
<p dir="auto">The latter will also return a pointer to the editor.</p>
</blockquote>
<p dir="auto">Then you can have your own <code>QLineEdit</code>, with <code>EchoMode</code>.</p>
<p dir="auto">Having said that: simpler would be using the approach in <a href="https://stackoverflow.com/questions/11056245/pyqt-using-qlineedit-as-cellwidget-in-a-qtablewidget" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/11056245/pyqt-using-qlineedit-as-cellwidget-in-a-qtablewidget</a>, i.e. <code>setCellWidget(QLineEdit())</code>, if you don't want to do it "properly" with an item delegate.  It will then stay as a <code>QLineEdit</code> even when not being edited, I don't know if you care.</p>
]]></description><link>https://forum.qt.io/post/622023</link><guid isPermaLink="true">https://forum.qt.io/post/622023</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 13 Oct 2020 12:38:17 GMT</pubDate></item><item><title><![CDATA[Reply to How do I change the password field to show &quot;******&quot; in table widget on Tue, 13 Oct 2020 11:20:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/koahnig">@<bdi>koahnig</bdi></a><br />
QTableWidget for editable row, While giving input I am trying to give string as *****</p>
]]></description><link>https://forum.qt.io/post/621997</link><guid isPermaLink="true">https://forum.qt.io/post/621997</guid><dc:creator><![CDATA[yashi95]]></dc:creator><pubDate>Tue, 13 Oct 2020 11:20:33 GMT</pubDate></item><item><title><![CDATA[Reply to How do I change the password field to show &quot;******&quot; in table widget on Tue, 13 Oct 2020 10:28:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/yashi95">@<bdi>yashi95</bdi></a></p>
<p dir="auto">What are you using in QTableWidget?</p>
<p dir="auto">For QLineEdit you can change the property setting <a href="https://doc.qt.io/qt-5/qlineedit.html#echoMode-prop" target="_blank" rel="noopener noreferrer nofollow ugc">EchoMode</a></p>
<p dir="auto">[edit: koahnig]  Just saw that the post is under "Qt for Phyton", which could be bit different. However, typically you look for similar settings in other languages.</p>
]]></description><link>https://forum.qt.io/post/621977</link><guid isPermaLink="true">https://forum.qt.io/post/621977</guid><dc:creator><![CDATA[koahnig]]></dc:creator><pubDate>Tue, 13 Oct 2020 10:28:46 GMT</pubDate></item></channel></rss>