Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Launching another application on button click on Mac
Qt 6.11 is out! See what's new in the release blog

Launching another application on button click on Mac

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 852 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DivyPrakash
    wrote on last edited by
    #1

    In my application on button clicked signal ,i have to launch another application (Skype).For that i use:
    @void Camera::OpenSkype()
    {
    qDebug()<<"OPEN SKYPE";
    QString cmd = QString("open %1").arg("/Applications/Skype.app/Contents/MacOS/Skype");
    QProcess::startDetached(cmd);
    }@

    It does launches "Skype" but i am facing following issues:

    1)It launches Skype but through terminal,meaning a new terminal window is always opened.
    It looks kind of ugly,that on every button click a terminal is launched which then launches skype.
    Is it possible to get rid of this terminal. (Even if it appears momentarily and exit then also it is fine)

    2)After exiting the app ( in this case Skype ),the focus should return back to the app which launched it.

    Any help is appreciated

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DivyPrakash
      wrote on last edited by
      #2

      I was able to get rid of Terminal window by using "-a" in the open command

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved