Important: Please read the Qt Code of Conduct -

WebDAV and Qt4

  • I am trying to write a calendar application under linux with qt4.
    I have found that webdav is developed for Qt3 and now I have some problem using it in Qt4.
    In webdav.h there is a line:
    @#include <QDomNodeList>@
    but I can't seem to find a class or anything under that name.

  • If webDAV was written for Qt3, you have to port it if you want to use it with Qt 4.
    You could find some help in the "docs":

  • Which "webdav" do you refer to? Qt (neither 3 nor 4) comes with an implementation of it.

  • I followed this description:

    My problem was:
    QHttp is deprecated in Qt4, but I solved it by this description:
    You have to activate the network library in the .pro file (QT+=network)

    but then comes that problem what I mentioned earlier

  • QDomNodeList is part of the XML module, so you have to add that module to your .pro file as well:

    QT += xml

  • thanx so much!

  • Now another question.
    I followed this description:

    But I cant use the line:
    @#include <QWebdav>@
    instead I am able to use this:
    @#include <qwebdav/QWebdav>@

    but this way the compiler drops the first error for the following line:
    @QWebdav webdav = new QWebdav;@
    @error: undefined reference to 'QWebdav::QWebdav(QObject

  • Hi Jazoja,

    regarding the include thing:
    where did you put the QWebDav includes and libs etc? You have to extend your include paths in the pro file (look at the docu, how to do it).

    The second error is a linker error i suppose. You do not link to the qwebdav dll. How to do it, depends on the tool chain. On windows, it's:

    MSVS tool chain:
    LIBS += qwebdav.lib

    mingw tool chain:
    LIBS += -lqwebdav
    LIBS += -L<path to webdav .a file>

  • It is ubuntu 10.10, but I think I upgrade to 11.04, because I have heard that it has integrated Qt support.

    The source files are in a subfolder under home, I made the build and install here, but I didn't specify target folders, everything went automatically.

    Now I am trying to find out what the installer (make install) did do.

  • on linux, if you use gcc, it's the same parameters as mingw

  • I use the IDE named "qt creator", I think it uses qmake. (that uses gcc...?)

  • QtCreator is the IDE.
    It uses a tool chain on your PC.
    On Linux, that is typically gcc.

  • I think I managed to solve the problem. :-)

    I have copied from here:
    to here:
    the following header files:
    and the information (?) files:
    @QWebdav (QtCreator looks for this file when compiling <QWebdav>)

    Now it compiles without errors.
    No adding or copying of the library was needed, maybe later...

    I am a beginner in Qt and linux, thanx for all the help and suggessions, it helped me a lot.

  • @#include <xxxx.h>@
    is only searched in standard inlcude paths (those which are added with -I to the compiler options), whereas

    @#include "xxxx.h"@
    is searched in standard include paths and local directories too.

    See older thread "Include Files": for discussion.

  • Sorry.
    Copying the compiled qwebdav lib files to usr/lib, and adding the line
    @unix|win32: LIBS += -lqwebdav@
    was also needed.

    Last time I did the same, but after deleting and removing them, qt compiled successfully again.

  • Ahhh...
    I reinstalled linux (deleted Ubuntu and installed Debian).
    Installed all the needed packages, and made the automated qwebdav make/install.
    Qt Creator didn't find <QWebdav>

    I made all the needed install steps, but Qt Creator still cannot find <QWebdav>.
    I placed the apropriate header and info files to the proper folders. (as I described before)

Log in to reply