| Trolltech Home | Qt4-preview-feedback Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 1 | |
Hi,
I programmed just after reading "Programming with qt4" my own model, inserting
data with
insertRow(0);
setData(index(0, 0), line->getLine());
setData(index(0, 1), line->getDate().toString(tr("yyyy.MM.dd hh:mm:ss")));
setData(index(0, 3), level2str(line->getLevel()));
Is there a hint, how to avoid the editing of items after a doubleclick?
Settings the complete model to readOnly?
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx
On Tuesday 24 April 2007 23:21, J. Preiss wrote:
> Hi,
>
> I programmed just after reading "Programming with qt4" my own model,
> inserting data with
>
> insertRow(0);
> setData(index(0, 0), line->getLine());
> setData(index(0, 1), line->getDate().toString(tr("yyyy.MM.dd hh:mm:ss")));
> setData(index(0, 3), level2str(line->getLevel()));
>
> Is there a hint, how to avoid the editing of items after a doubleclick?
> Settings the complete model to readOnly?
If you are using QStandardItemModel check out QStandardItem::setFlags()
otherwise if you are implementing your own model you want to reimplement
QAbstractItemModel::flags().
For future notice though you want to ask this in qt-interest. This mailing
list hosts discussions about the Qt Technology Preview releases.
-Benjamin Meyer
Attachment:
Attachment:
pgpmcxjrDFE9Y.pgp
Description: PGP signature