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. QClipboard and Windows service

QClipboard and Windows service

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k Views
  • 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.
  • M Offline
    M Offline
    MarxWright
    wrote on last edited by
    #1

    I have created a program that monitors the clipboard for an image and it works fine, if only that where the end of it.

    However I am required to have this programming running as a windows service and the code that works fine in the user environment doesn't work when setup as a service.

    The connect function for the clipboard returns true when setting up the signal for the dataChanged function however the slot is never called when the clipboard data changes.

    Can anyone with a more in depth knowledge of Qt offer any help as to why the windows service version would not work when a standard executable does and furthermore if it's possible to get the service to work as intended.

    Thanks for any help you can provide.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MuldeR
      wrote on last edited by
      #2

      System services use a special user Account (actually there are several special user accounts for services) and they also run in a separate "none interactive" session, which is pretty much shielded from the user's "interactive" session. For example, you cannot create/show GUI dialogs from a system service on modern Windows (Vista+). So I guess that's also the reason why you cannot access the Clipboard. If the service session does have a clipboard at all (which I'm not so sure), it will be a separate one from the user's.

      I guess you will need to run a "background" task (like a "tray icon" app) inside the user's session as a regular application to interact with the clipboard. This application can then send the data to the system service...

      My OpenSource software at: http://muldersoft.com/

      Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

      Go visit the coop: http://youtu.be/Jay...

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MarxWright
        wrote on last edited by
        #3

        Thanks for the reply, I have had this trouble before with services and had to implement a separate program to give the user some feedback when an error has occurred. I was thinking i'd have to do the same with this problem I'm reasonably new to Qt so I wanted to check with some more experienced users to see if this was my only option or if there's any way to get the QClipboard to pickup this clipboard activity.

        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