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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -