Results 1 to 6 of 6

Thread: QT4 + winhttp

  1. #1
    Join Date
    Jan 2010
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy QT4 + winhttp

    I believe that i am the only one in the whole universe that wants to link qt with winhttp.lib.
    I am looking for some help about this subject and i found nothing.
    I am using qt4 creator with mingw32 @ windows 7.
    I tried everything and i mean everything...!

    LIBS += -L... -l in .pro file, in project settings for building
    I tried
    inside makefiles(release, debug).
    I tried LIBS += mylib.lib and INCLUDEPATHS +=...

    But no result. Keep getting winhttp.h file or directory not found.
    Please help. I want to use winhttp with qt (QHttp is obsolete).
    Is it possible to accomplish this task?

    Sorry for my english, it is not my native language.

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

    Default Re: QT4 + winhttp

    Why not use QNetworkAccessManager instead?

    As for your direct problem - the LIBS variable has nothing to do with includes. You need to change the INCLUDEPATH (note the lack of "S" at the end) variable.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2010
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT4 + winhttp

    i wrote INCLUDEPATHS on my hurry, in project file i have written INCLUDEPATH. I know that includes have nothing to do with libs but @ a forum there was this solution also. nvm

    How can i get the body from the http reply using QNetworkAccessManager and QNetworkReply ?
    Can you provide a working example?

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

    Default Re: QT4 + winhttp

    Quote Originally Posted by TNT View Post
    How can i get the body from the http reply using QNetworkAccessManager and QNetworkReply ?
    QNetworkReply is a QIODevice, just call readAll() on it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    TNT (5th January 2010)

  6. #5
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QT4 + winhttp

    I am using qt4 creator with mingw32 @ windows 7.
    Just to warn you:
    AFAIR you can't link MinGW app with MSVC libraries and this filename:
    winhttp.lib
    looks like MSVC lib.
    But maybe I am wrong...
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  7. The following user says thank you to faldzip for this useful post:

    TNT (5th January 2010)

  8. #6
    Join Date
    Jan 2010
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT4 + winhttp

    Thank you both!

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.