[Solved] Disable QStringListModel
Hello gang: I am able to present a list in a view. It is editable, and has a sliding "elevator" to adjust the view. I want to disable the editable characteristic, without disabling the elevator.
QAbstractItemModel *model = new QStringListModel(textList);
QListView *view = new QListView;
QVBoxLayout *layout = new QVBoxLayout;
I tried view->setDisabled(1), and that disabled editing, but also disabled the elevator.
In order to make the view as non editable you can try:
you can have a look at "QAbstractItemView Class Reference":http://qt-project.org/doc/qt-4.8/qabstractitemview.html#editTriggers-prop and "EditTrigger":http://qt-project.org/doc/qt-4.8/qabstractitemview.html#EditTrigger-enum
Thank you Sam -- that is perfect!
You are most welcome my friend :)