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. To QtService or not to QtService?
Forum Updated to NodeBB v4.3 + New Features

To QtService or not to QtService?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 2.8k Views 3 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.
  • B Offline
    B Offline
    Bart_Vandewoestyne
    wrote on last edited by
    #1

    Hello,

    I need to implement a program that will run on both Windows and Linux machines, and that acts as some kind server or service/daemon: the program will listen for incoming XML messages, will process these messages and perform certain actions depending on what XML message it received, and will send XML responses.

    Now I came across the QtService class at https://github.com/qtproject/qt-solutions/tree/master/qtservice and I am wondering what to do, with my options probably being:

    1. Write the program without using QtService.
    2. Use QtService and make it a real service (on Windows) or daemon (on Linux).

    However, it is not completely clear to me why I should us QtService (or why not...)
    What extra benefits does it give me if I decide to write the program using the QtService? What are the typical use-cases? Are there any disadvantages for using it too?

    And also, from the documentation for the 2.0 version at https://github.com/qtproject/qt-solutions/blob/master/qtservice/README.TXT I read "Reimplemented for Qt 4 with improved API."
    Our codebase already uses Qt 5.15.1. Is QtService working with Qt 5.15.X?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      paulpv
      wrote on last edited by
      #2

      Did you ever make a decision on this?

      There is also https://github.com/Skycoder42/QtService, which Skycoder42 does not disagree is dead, and which also has questionable support for Qt6.

      I am just now at the point of deciding to use an existing lib to do this, or to just implement a simple Windows over version for now that meets my immediate needs.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        ChrisW67
        wrote on last edited by
        #3

        What extra benefits does it give me if I decide to write the program using the QtService? What are the typical use-cases? Are there any disadvantages for using it too?

        It saves you the time of writing code to install or uninstall a Windows service and interface with that control system.
        On UNIX-like systems you get a socket-based control interface that provides similar capability.

        Our codebase already uses Qt 5.15.1. Is QtService working with Qt 5.15.X?

        Probably, the Qt Solutions Library version has had some Qt5 compatibility work done to it. Should take all of 10 minutes to do the experiment.

        @paulpv The SkyCoder42 QtService does not seem to be a branch of the Qt Solutions version. It seems more capable in some areas but does cover others, most notably Windows service installation.
        The code clearly has comments related to Qt 6 compatibility so YMMV.

        Really depends on your specific requirement and what environments you need to support.

        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