Results 1 to 5 of 5

Thread: QtService example interactive not running

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,316
    Thanks
    315
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QtService example interactive not running

    What in the heck could I be doing wrong that even the example doesn't run?
    Having a bad month, maybe?

    I have never messed with trying to create and Windows service. I'm wondering if you could find a non-Qt service example, maybe on the MSDN site (like this one), that you could get working. Services normally run without a GUI, so I also wonder if there is a flag you are missing in the command line that says "run interactively", and without it, you get a background process.

    But then there are these lines from the Qt Solutions QtService "interactive" example:

    Qt Code:
    1. void InteractiveService::start()
    2. {
    3. #if defined(Q_OS_WIN)
    4. if ((QSysInfo::WindowsVersion & QSysInfo::WV_NT_based) &&
    5. (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA)) {
    6. logMessage( "Service GUI not allowed on Windows Vista. See the documentation for this example for more information.", QtServiceBase::Error );
    7. return;
    8. }
    9. #endif
    To copy to clipboard, switch view to plain text mode 

    Windows 7 and 10 certainly pass the >= WV_VISTA test, so you'll see a log message and no GUI.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. The following user says thank you to d_stranz for this useful post:

    TonyInSoMD (13th March 2018)

Similar Threads

  1. interactive design
    By pedro74 in forum Qt Programming
    Replies: 3
    Last Post: 10th September 2016, 18:42
  2. Interactive graphics in Qt
    By wconstan in forum Newbie
    Replies: 2
    Last Post: 15th December 2010, 20:51
  3. Replies: 0
    Last Post: 1st May 2010, 12:41
  4. QtService on Windows as Non-Interactive
    By stefanadelbert in forum Qt Programming
    Replies: 2
    Last Post: 26th April 2010, 03:27
  5. qsqlquery interactive?
    By lamera in forum Newbie
    Replies: 2
    Last Post: 7th September 2008, 10:09

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
  •  
Qt is a trademark of The Qt Company.