Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Unsolved How to allow open two or more instances of an application?

    General and Desktop
    4
    5
    1619
    Loading More Posts
    • 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.
    • Mufan
      Mufan last edited by

      Hi!

      I have an application written with Qt Creator 4.6.1 (Based on Qt 5.10.1).
      When I have this application launched and make another double click on the application icon, the first instance (which is already launched) shows.
      Is it possible to set some flags or do something and be able to open another instance?

      Thanks a lot!
      Serge

      JonB 1 Reply Last reply Reply Quote 1
      • JonB
        JonB @Mufan last edited by JonB

        @Mufan
        Normally each launch would create a separate instance (try it in a simple app test). Does the code already have something which prevents that? Google for qt application multiple instances and you'll see people discussing what might be done to prevent them.

        1 Reply Last reply Reply Quote 1
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          What platform are you running on ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          Mufan 1 Reply Last reply Reply Quote 0
          • Mufan
            Mufan @SGaist last edited by

            @SGaist
            Hi! I'm running on MacOS.

            @JonB
            I don't use "lock unique files" or QSystemSemaphore methods to prevent this. That should be something else.

            1 Reply Last reply Reply Quote 0
            • M
              mpergand last edited by mpergand

              On Mac, the Finder doesn't allow users to launch multiple instances of the same app.

              Work around:

              • Duplicate the app with a different name.
              • With the Terminal, use open command with the path of the executable in the app bundle folder, like that:
                open AppName.app/Contents/MacOS/AppName
              1 Reply Last reply Reply Quote 4
              • First post
                Last post