首页| 论坛| 消息

回复: 关于QTableWidget右键菜单异常退出的问题。
#6 回 fsx92 的帖子 [lwei24 03-12 10:16]
fsx92:异常退出,一般考虑是指针的问题。 (2021-03-10 17:13) 
好的,多谢给我一个思考的方向!
#7 [fsu0413 03-12 18:24]
其实用不着这么复杂,直接addActions,然后用setContextMenuPolicy(Qt::ActionsContextMenu);
我觉得你的问题是menu添加的本身就不对,具体怎么不对我也没细看。
#8 回 lwei24 的帖子 [zy1233 03-15 11:17]
lwei24:请问它们不可以是父子关系吗? (2021-03-12 10:15) 
void QWidget::stackUnder(QWidget *w)
Places the widget under w in the parent widget's stack.
To make this work, the widget itself and w must be siblings.
只能是兄弟关系
#9 回 fsu0413 的帖子 [lwei24 03-25 15:06]
fsu0413:其实用不着这么复杂,直接addActions,然后用setContextMenuPolicy(Qt::ActionsContextMenu);
我觉得你的问题是menu添加的本身就不对,具体怎么不对我也没细看。 (2021-03-12 18:24) 
好吧,多谢指点,那我再检查检查!
#10 回 zy1233 的帖子 [lwei24 03-25 15:07]
zy1233:void QWidget::stackUnder(QWidget *w)
Places the widget under w in the parent widget's stack.
To make this work, the widget itself and w must be siblings.
....... (2021-03-15 11:17) 
哦哦,多谢指点!

<< 1 2 >> (2/2)

回复 发表
主题 版块