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. [Solved] Only one instance of application
Qt 6.11 is out! See what's new in the release blog

[Solved] Only one instance of application

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 6.1k 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.
  • S Offline
    S Offline
    szh1
    wrote on last edited by
    #1

    How can I make it that the user can only run one instance of my application at a time?

    Thanks in advance.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tony
      wrote on last edited by
      #2

      Hi,

      you can use "QtSingleApplication":http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Utilities/qtsingleapplication/, a class supplied by Qt Solutions Catalog.

      Tony.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        szh1
        wrote on last edited by
        #3

        [quote author="Antonio Di Monaco" date="1288976186"]Hi,

        you can use "QtSingleApplication":http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Utilities/qtsingleapplication/, a class supplied by Qt Solutions Catalog.

        Tony.[/quote]

        Thanks for the help!

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          Yash
          wrote on last edited by
          #4

          Also if your app is simple and don't want any new command line arguments
          Simple use QProcess to check process exits or not
          if yes say stop running the app.

          Obviously QtSingleApplication is good solution but not for simple apps.

          http://kineticwing.com : Web IDE, QSS Editor
          http://speedovation.com : Development Lab

          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