StupidBeauty
Read times:746Posted at:Fri Jun 21 00:22:50 2013
- no title specified

转载:QTableWidget几点用法

使用setCellWidget函数,可向表格中加入标准控件,例如按钮。

http://tangxunmin.blog.163.com/blog/static/10060135620123804513508/

亮点

添加一个按钮到第三行,直接new一个pushbutton然后使用ui.tablewidget->setCellWidget(2,0,Button);效果不能达到要求效果如下:

QTableWidget几点用法 - tangxunmin - tangxunmin的博客QTableWidget几点用法 - tangxunmin - tangxunmin的博客

后改用自定义一个widget,在widget上放一个button,再用ui.tablewidget->setCellWidget(2,0,widget);可以实现如下效果:

QTableWidget几点用法 - tangxunmin - tangxunmin的博客QTableWidget几点用法 - tangxunmin - tangxunmin的博客

本来说使用

人体艺术

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4