Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚刚完成了我的第一个 Qt 5 项目,我想添加一个 About 对话框。是否有默认值,您如何使用它?如果没有,添加并编辑它并使用“帮助”菜单操作显示其内容的最佳方法是什么?任何帮助,将不胜感激。提前致谢。
向项目中添加对话框的方式在一定程度上取决于您使用的开发环境。您始终可以使用 QtDesigner(Qt 的一部分)来设计您的 About 对话框,然后将其添加到您的项目中。要显示它,只需在连接到About QAction 对象的信号的插槽中调用类的exec()函数。QDialogtriggered()
exec()
QDialog
triggered()