[Interest] QTableView, readonly and selectable column text/data?
Mark Gaiser
markg85 at gmail.com
Fri Aug 15 13:59:25 CEST 2014
Hi,
I have a QTableView with data from a custom QSqlQueryModel.
So far so good, data displays just fine.
I'm searching for functionality to select text in any column as if the
flag: Qt::ItemIsEditable is set. However, setting that also allows the
user to edit (type) in the field which is not what i want.
As an example, if you set readonly to true on a QLineEdit you get the
exact functionality that i want. But i don't know how to get the
QLineEdit (or whatever is used for a cell) object from a QTableView
without subclassing it.
Is there a simple way to get the functionality as described above
without subclassing QTableView?
Best regards,
Mark
More information about the Interest
mailing list