Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.2k views
in Technique[技术] by (71.8m points)

QT点击按钮,在按钮下方紧贴着出现一个表格控件,点击空白处或控件内内容关闭控件

我有两个思路:
1.用菜单,能实现点击空白处或控件内内容关闭控件,但是不满足我需要一个表格型控件的需求
2.生成一个tableview,但是我不知道如何准确的出现在按钮下方,和实现点击空白处或控件内内容关闭控件的功能


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

1.重载QComboBox
2.使用一个QPushButton和QDialog
总的来说第二种方案比较容易实现


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...