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.
setHeaderDataQt 中有一个函数QAbstractItemModel。是否有任何事件可以调用该函数来设置标题数据,例如 F2 键或鼠标双击?
setHeaderData
QAbstractItemModel
当然,您可以创建一个连接到“双击”信号的插槽并调用您的模型实例setHeaderData //如果您在自己的模型类型中覆盖了该函数,则需要发出 headerDataChanged 信号,请参见此处