• 4753阅读
  • 0回复

请教Model/View中Delegate如何改变默认的EndEditHint? [复制链接]

上一主题 下一主题
离线xuralf
 
只看楼主 正序阅读 楼主  发表于: 2007-06-03
— 本帖被 XChinux 从 General Qt Programming 移动到本区(2011-01-02) —
小弟初学入门,非常困惑。。。
QT4.2.3的Item View中例子的Spin Box Delegate在用户结束编辑后如果想emit closeEditor()这个signal从而把EndEditHint改成比如EditNextItem,请问应该如何做呢?  我自己试着在那个例子中的SpinBoxDelegate::setModelDate的最后emit,好像不行。程序例子中最后解释的" if the user hits Return to confirm their choice in the spin box, the delegate commits the value to the model and closes the spin box. We can change this behavior by installing our own event filter on the spin box",这里的"installing our own event filter on the spin box"是什么意思?

现在比较晕,麻烦各位高手指点,呵呵~~
快速回复
限100 字节
 
上一个 下一个