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. How to keep my program running in the background?
Forum Updated to NodeBB v4.3 + New Features

How to keep my program running in the background?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 3 Posters 2.2k 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.
  • P Offline
    P Offline
    PandaBoy
    wrote on last edited by A Former User
    #1

    HI, everyone. This is my first post,it might have a lot of mistakes. If there is anything confusing I will rephrase my post ASAP.
    I am writing a program that keeps scanning a certain directory checking if there is new files added to that location. I want it keeps running in background and having an icon in notification area just like Antivirus programs. Right clicking the Icon in notification area will allow me to change the setting of that program or quit.
    What confusing me is :
    How can I keep this program running ?
    How to show a icon in notification area?
    It mainly works on Windows 8. It would be perfect if it can be extended to other version of Windows. I am not considering Mac or Linux etc.
    I am eager to learn all the missing knowledge that makes me ask those silly questions. You are more than appreciated if you can recommend some books about this Or tell me how to find them if they were already mentioned in Qt document.
    Thank you very much.

    p3c0P 1 Reply Last reply
    0
    • P PandaBoy

      HI, everyone. This is my first post,it might have a lot of mistakes. If there is anything confusing I will rephrase my post ASAP.
      I am writing a program that keeps scanning a certain directory checking if there is new files added to that location. I want it keeps running in background and having an icon in notification area just like Antivirus programs. Right clicking the Icon in notification area will allow me to change the setting of that program or quit.
      What confusing me is :
      How can I keep this program running ?
      How to show a icon in notification area?
      It mainly works on Windows 8. It would be perfect if it can be extended to other version of Windows. I am not considering Mac or Linux etc.
      I am eager to learn all the missing knowledge that makes me ask those silly questions. You are more than appreciated if you can recommend some books about this Or tell me how to find them if they were already mentioned in Qt document.
      Thank you very much.

      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi @PandaBoy,
      I think what you are looking for is QSystemTrayIcon. An example here. It will also be in your Qt installed directory.

      157

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

        Hi and welcome to devnet,

        to show icon you can use QSystemTrayIcon.

        to keep the application running you could create it as a Windows Service.
        If you wont to create a Windows-only application you can also have a look to this

        Once your problem is solved don't forget to:

        • Mark the thread as SOLVED using the Topic Tool menu
        • Vote up the answer(s) that helped you to solve the issue

        You can embed images using (http://imgur.com/) or (http://postimage.org/)

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved