Hi K. Frank,

On 01/07/2012 19:50, K. Frank wrote:
> Hello List!
>
> I have a QTableView (backed by a QSqlTableModel) and am looking
> for a simple way to make a column read-only.  Poking around in the
> documentation, I don't see anything obviously simple.

Take a look at the function QAbstractItemModel::flags(). You can 
override this in your model such that flags it returns do not include 
Qt::ItemIsEditable for the column you wish to be read-only.

Sean


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to