Results 1 to 4 of 4

Thread: Windows Service

  1. #1
    Join Date
    May 2007
    Posts
    90
    Thanks
    40
    Qt products
    Qt4
    Platforms
    Windows

    Question Windows Service

    Can I use a QtApplication in a Windows service, or does it have to be a QCoreApplication?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Windows Service

    I don't see a reason why it should be forbidden, so probably you can. If it doesn't work you can surely use QCoreApplication and spawn a separate application using QApplication and communicate with it using some IPC mechanism.

  3. The following user says thank you to wysota for this useful post:

    TheGrimace (5th October 2007)

  4. #3
    Join Date
    May 2007
    Posts
    90
    Thanks
    40
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: Windows Service

    Thank You.

    Do you see any reason that I could not load a widget using a service (even if I did not show it) Or does windows prevent the loading of the QtGUI dll?

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Windows Service

    I don't know that much about Windows architecture. It surely won't prevent loading the library itself but if services are initialized before the display system is ready, creating a QApplication object might fail. But I'm just guessing. I think you should try it and see what you get.

  6. The following user says thank you to wysota for this useful post:

    TheGrimace (5th October 2007)

Similar Threads

  1. Replies: 10
    Last Post: 25th February 2007, 01:23
  2. Deploying with MySQL support under Windows
    By KShots in forum Installation and Deployment
    Replies: 1
    Last Post: 12th October 2006, 10:19
  3. converting unix exe to windows binary
    By deekayt in forum General Programming
    Replies: 2
    Last Post: 17th September 2006, 02:00
  4. qt and mingw can not run on windows 98?
    By evewei in forum Installation and Deployment
    Replies: 4
    Last Post: 26th June 2006, 10:22
  5. MDI windows without QWorkspace
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 16th June 2006, 18:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.