Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

How to bring another program to front?



  • Hi
    I want to execute Chromium and LeafPad from my Qt Application, and whenever I want, switch between them (bring each of them I desire to front)
    I can execute them with QProcess, but I can't bring them to front.
    Any help will be appreciated.


  • Moderators

    this can only be achieved using platform dependent code.
    Use QProcess::pid() to get the process id and use it to search for the corresponding window.

    For example in Linux.

    Not every application also has a visual window at all and some applications have multiple windows. So this may be a bit tricky. Unless you anyway always call the same applications.


Log in to reply