使用setCellWidget函数,可向表格中加入标准控件,例如按钮。
http://tangxunmin.blog.163.com/blog/static/10060135620123804513508/
亮点 :
添加一个按钮到第三行,直接new一个pushbutton然后使用ui.tablewidget->setCellWidget(2,0,Button);效果不能达到要求效果如下:
后改用自定义一个widget,在widget上放一个button,再用ui.tablewidget->setCellWidget(2,0,widget);可以实现如下效果:
本来说使用
人体艺术
HxLauncher: Launch Android applications by voice commands