简体   繁体   English

如何在项目中添加关于对话框

[英]How to add About dialog to project

I have just completed my first Qt 5 project and I want to add an About dialog. 我刚完成我的第一个Qt 5项目,并且想添加一个About对话框。 Is there a default, and how do you use it? 是否有默认值,以及如何使用它? If not, what's the best way to add one and edit it and display its content using the Help menu action? 如果不是,使用“帮助”菜单操作添加,编辑并显示其内容的最佳方法是什么? Any help would be appreciated. 任何帮助,将不胜感激。 Thanks in advance. 提前致谢。

The way to add a dialog to your project depends a little bit on what development environment you are using. 向项目中添加对话框的方式在某种程度上取决于您使用的开发环境。 You can always use QtDesigner (part of Qt) to design your About dialog and then add it to your project. 您始终可以使用QtDesigner(Qt的一部分)设计“关于”对话框,然后将其添加到您的项目中。 To display it, just call the exec() function of the QDialog class in a slot connected to the triggered() signal of your About QAction object. 要显示它,只需在连接到About QAction对象的trigger triggered()信号的插槽中调用QDialog类的exec()函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM