Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个继承自 QStyledItemDelegate 的自定义委托。现在,我对添加的小部件所做的某些更改仅在createEditor触发时显示如何以编程方式触发 createEditor?我有行和列,我想触发createEditor?
createEditor
您可以找到QModelIndex按行和列并调用QAbstractItemView::edit(const QModelIndex &index)以触发项目的编辑。
QModelIndex
QAbstractItemView::edit(const QModelIndex &index)