Can't I modify qlistview's item? can i modify only qlistwidget's item?
I want to modify listview's item.
so I add code this:
but anythings are not changed.
I double-click listview's item, but i can't edit item..
I show some example about editing tablewidget's item.
Can I edit only listWIDGET or tableWIDGET, NOT listVIEW, tableVIEW??
than why listview has <setEditTriggers>function??
I can't understand.....
PLEASE HELP ME!
Re: Can't I modify qlistview's item? can i modify only qlistwidget's item?
have you examined the model -view examples?
Re: Can't I modify qlistview's item? can i modify only qlistwidget's item?
Thanks for your answer!
sorry..
Where is model-view example?
I examined only itemview example.
I can't find model-view example.
Is right you mean example of qt\4.8.2\exmaples?
I think editable itemview's exmaple is only listwidget not listview..
Isn't it??
Re: Can't I modify qlistview's item? can i modify only qlistwidget's item?
The model underlying the view class needs to be editable or the view will not be able to edit it regardless of the edit triggers. The model needs to return Qt::ItemIsEditable amongst the flags() for the items the model allows editing for.
Re: Can't I modify qlistview's item? can i modify only qlistwidget's item?
I FIND EDITABLE LISTVIEW EXMAPLE!
but, this example use QStringListModel.
so I change QStingListModel to QAbstractListModel that i reimplement.
than this exmaple is broken! changed to no-editable ...
why????:crying:
thankyou ChrisW67.
actually I can't fully understand you're answer.
but roughly understanding, i add code
Code:
Qt
::ItemFlags GalleryModel
::flags(const QModelIndex & index
){
return Qt::ItemIsEditable;
}
GalleryModel is my QAbstractListModel...
isn't what you mean?
but still item's not changed..
when called flag function of model?
I can't understand :confused:
Re: Can't I modify qlistview's item? can i modify only qlistwidget's item?
This should spill the light.
Re: Can't I modify qlistview's item? can i modify only qlistwidget's item?
oh my god....
You were right!
I reimplement flags and setdata function. but It is not activate properly. so I ask a question you continues..
Because I think i do all action for listview's editable, I am very confused.
But I find I droped word 'const' in my flags function:eek:
And I got the all I wants.
THANK YOU! THANK YOU!
sprit Thanks for your interest.
Actually, i can't understand 'This should spill the light.'s mean..
It means you need more information?
I can't speak english, well. sorry.
IF we will meet next time, help me please! thank you:)