c++ - Closing editors of QAbstractItemView -
i'm using qabstractitemview manipulate queue. problem editor doesn't close , update value in model when user hits send button. causes frustration.
i've gone through qt docs, can't seem find simple way of closing editor , committing changes. how should go this?
this used
void projectexplorerview::closecurrenteditorifopen(bool commit) { qwidget* w = indexwidget(currentindex()); if (w != nullptr) { if (commit) { commitdata(w); closeeditor(w, qabstractitemdelegate::submitmodelcache); } else { closeeditor(w, qabstractitemdelegate::revertmodelcache); } } }
Comments
Post a Comment