<?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[QStyledItemDelegate and QStandardItem preventing change text , enable only select and copy]]></title><description><![CDATA[<p dir="auto">have a simple QStandardItem and QTableView and QStyledItemDelegate. They have delegates , I would like to disable the possibility for user to change the content of a column in the table, and allow only select and copy. I guess it related to QStyledItemDelegate::createEditor.</p>
<p dir="auto">When I set it to return 0, it just disable everything.</p>
<p dir="auto">@QWidget *InfoTableItemDelegate::createEditor(QWidget *parent,<br />
const QStyleOptionViewItem &amp;option,<br />
const QModelIndex &amp;index) const<br />
{<br />
// return QStyledItemDelegate::createEditor(parent, option, index);<br />
return 0;<br />
}@</p>
<p dir="auto">my question is , how can i defined it so i can only select and copy , and disable the option to edit it like delete or change the text</p>
]]></description><link>https://forum.qt.io/topic/21796/qstyleditemdelegate-and-qstandarditem-preventing-change-text-enable-only-select-and-copy</link><generator>RSS for Node</generator><lastBuildDate>Fri, 12 Jun 2026 13:47:32 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/21796.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 29 Nov 2012 08:11:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QStyledItemDelegate and QStandardItem preventing change text , enable only select and copy on Thu, 29 Nov 2012 14:02:29 GMT]]></title><description><![CDATA[<p dir="auto">Hi! I am not sure but maybe "QStandardItem::setFlags":<a href="http://doc.qt.digia.com/qt/qstandarditem.html#setFlags" target="_blank" rel="noopener noreferrer nofollow ugc">http://doc.qt.digia.com/qt/qstandarditem.html#setFlags</a> will help</p>
]]></description><link>https://forum.qt.io/post/158272</link><guid isPermaLink="true">https://forum.qt.io/post/158272</guid><dc:creator><![CDATA[terenty]]></dc:creator><pubDate>Thu, 29 Nov 2012 14:02:29 GMT</pubDate></item></channel></rss>