Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-28967

QSingleApplication for Qt 5

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.0.0
    • GUI: Window management
    • None

    Description

      Qt 4 had a solution for singleton instance applications, which only had one window and when started again, simply activated that one window. This is primarily used by heavier applications, like webbrowsers, but has some merit.

      Ways this could be implemented:

      • Direct support in QtGui via QGuiApplication::setSingletonApplication(true/false) and QGuiApplication::activated(QStringList args), and backend support implemented in the specific platform plugins. Probably not too much work in QtGui, but requires IPC and new API in the platform plugins.
      • Shell script. It seems firefox uses a shell script and a firefox.bin which is the actual application.
      • Shell application, gives us a bit more flexibility and control compared to shell script. Could be written mostly with Qt.

      If we do this as a shell app, we could simply do it as an example in qtbase/examples/gui/singleapp and have the right hooks for windows, linux and mac in the example itself. Users could use that as a basis for their own singleton applications.

      Attachments

        For Gerrit Dashboard: QTBUG-28967
        # Subject Branch Project Status CR V

        Activity

          People

            simonburrows Simon Burrows
            sletta Gunnar Sletta
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change