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":http://doc.qt.nokia.com/4.7/porting4.html -
I followed this description:
http://xf.iksaif.net/dev/qwebdav.htmlMy 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)
http://www.qtforum.org/article/13401/qt-4-0-qhttp-problem.htmlbut then comes that problem what I mentioned earlier
-
Now another question.
I followed this description:
http://xf.iksaif.net/dev/qwebdav.htmlBut 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;@
saying:
@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.
-
I think I managed to solve the problem. :-)
I have copied from here:
@desktop/qwebdav/src/@
to here:
@/usr/include/qt4/QTWebDAV@
the following header files:
@webdav.h
webdav_export.h
webdav_url_info.h@
and the information (?) files:
@QWebdav (QtCreator looks for this file when compiling <QWebdav>)
QWebdavUrlInfos@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":http://developer.qt.nokia.com/forums/viewthread/3051 for discussion.
-
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)