简体   繁体   English

将QProcess窗口移到最前面(运行Qt Assistant)

[英]Bring QProcess window to front (running Qt Assistant)

My Qt application starts a QProcess that runs Qt Assistant. 我的Qt应用程序启动了一个运行Qt Assistant的QProcess。

I am using Linux (Ubuntu/Neon/KDE) but I want the Qt application to run on Windows and other Linux distributions as well. 我正在使用Linux(Ubuntu / Neon / KDE),但我希望Qt应用程序也可以在Windows和其他Linux发行版上运行。

Now I need a function that allows to bring the Assistant main window to front at the desktop. 现在,我需要一个允许将助手主窗口置于桌面前的功能。

I could not find a solution doing this using the QProcess object. 我找不到使用QProcess对象执行此操作的解决方案。 Also I could not find a way to do this via Qt Assistant remote control. 我也找不到通过Qt Assistant遥控器执行此操作的方法。

How can I do this in a portable way? 我该如何通过便携式方式做到这一点?

If all you need is showing qhc help files along with your application, you can have a look at the Qt Help module , which is used by Assistant itself. 如果您只需要显示qhc帮助文件以及您的应用程序,则可以查看Assistant本身使用的Qt帮助模块

Instead of showing the help in an external application like the Qt Assistant, it is also possible to embed the online help in the application. 除了在Qt Assistant之类的外部应用程序中显示帮助之外,还可以将在线帮助嵌入到该应用程序中。 The contents can then be retrieved via the QHelpEngine class and can be displayed in nearly any form. 然后可以通过QHelpEngine类检索内容,并且可以几乎以任何形式显示内容。 Showing the help in a QTextBrowser is probably the most common way, but embedding it in What's This help is also perfectly possible. 在QTextBrowser中显示帮助可能是最常见的方法,但是将其嵌入到What's This中也是完全可能的。

More here 这里更多

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

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