Qt Forum

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

    [solved] QtSingleApplication and Qt 5

    General and Desktop
    6
    8
    23564
    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.
    • V
      Violet Giraffe last edited by

      The latest version of QtSingleApplication does not compile with Qt 5 because of some QT_WA macros that are not present. Is there any way to use QtSingleApplication in Qt 5 project?

      1 Reply Last reply Reply Quote 0
      • I
        Itehnological last edited by

        QSingleApplication uses lots of deprecated classes and methods in Qt5 so you should look for an alternative.
        I created a similar functionality with QLocalServer and QLocalSocket.
        I can share the source...

        1 Reply Last reply Reply Quote 0
        • J
          JulienMaille last edited by

          Yes please share!

          1 Reply Last reply Reply Quote 0
          • L
            lgeyer last edited by

            [quote author="Violet Giraffe" date="1356206549"]Is there any way to use QtSingleApplication in Qt 5 project?[/quote]The Qt Solutions Archive has been added to Qt Project Code Review system recently, so patches for Qt5 might finally go in.

            Until then, feel free to clone the "patched QtSingleApplication":http://qt.gitorious.org/~lgeyer/qt-solutions/lgeyers-qt-solutions, which should work with Qt4 as well as with Qt5.

            1 Reply Last reply Reply Quote 0
            • I
              Itehnological last edited by

              "SingleApplication Repository":https://github.com/Itehnological/SingleApplication

              Take a look at the main.cpp. My Class just replaces the QGuiApplication like QSingleApplication does. Also connect to the showUp signal to implement the focus on the main instance window when another instance is initiated.

              The last is best achieved like this:
              @
              window->hide();
              window->showExpanded();
              @

              1 Reply Last reply Reply Quote 0
              • V
                Violet Giraffe last edited by

                Much appreciated!

                1 Reply Last reply Reply Quote 0
                • B
                  bunjee last edited by

                  Thanks Guys <3 !

                  1 Reply Last reply Reply Quote 0
                  • A
                    astodolski last edited by

                    [quote author="Lukas Geyer" date="1356255913"][quote author="Violet Giraffe" date="1356206549"]Is there any way to use QtSingleApplication in Qt 5 project?[/quote]The Qt Solutions Archive has been added to Qt Project Code Review system recently, so patches for Qt5 might finally go in.

                    Until then, feel free to clone the "patched QtSingleApplication":http://qt.gitorious.org/~lgeyer/qt-solutions/lgeyers-qt-solutions, which should work with Qt4 as well as with Qt5.

                    [/quote]

                    Will not build using Qt 5.1.1 libraries on Windows

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post