如何从Qt发送消息到本地应用程序

From Qt how to send message to a native application

本文关键字:应用程序 消息 Qt      更新时间:2023-10-16

我找到了一个c++应用程序来创建启动屏幕。这将创建一个命名事件,以便从另一个应用程序关闭此应用程序。我有一个如何从。net应用程序关闭它的例子:

private void CloseSplashScreen()
    {
        // signal the native process (that launched us) to close the splash screen
        using (var closeSplashEvent = new EventWaitHandle(false, EventResetMode.ManualReset, "CloseSplashScreenEventSplashScreenStarter"))
        {
            closeSplashEvent.Set();
        }

现在,我不知道如何从qt5应用程序做同样的事情。我是新的Qt所以请,给一个例子。

试图将。net代码集成到您的Qt应用程序中,只是为了显示一个启动屏幕:坏主意。

这是在Google上快速搜索"qt闪屏"的结果。

http://www.developer.nokia.com/Community/Wiki/How_to_display_a_splash_screen_in_Qthttp://qt project.org/doc/qt - 5.0 -/- qtwidgets/qsplashscreen.html