Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. WebDAV and Qt4
Forum Updated to NodeBB v4.3 + New Features

WebDAV and Qt4

Scheduled Pinned Locked Moved Installation and Deployment
16 Posts 4 Posters 9.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jazoja
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      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

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

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

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jazoja
          wrote on last edited by
          #4

          I followed this description:
          http://xf.iksaif.net/dev/qwebdav.html

          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)
          http://www.qtforum.org/article/13401/qt-4-0-qhttp-problem.html

          but then comes that problem what I mentioned earlier

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

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

            @
            QT += xml
            @

            1 Reply Last reply
            0
            • J Offline
              J Offline
              Jazoja
              wrote on last edited by
              #6

              thanx so much!

              1 Reply Last reply
              0
              • J Offline
                J Offline
                Jazoja
                wrote on last edited by
                #7

                Now another question.
                I followed this description:
                http://xf.iksaif.net/dev/qwebdav.html

                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;@
                saying:
                @error: undefined reference to 'QWebdav::QWebdav(QObject
                )'@

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  giesbert
                  wrote on last edited by
                  #8

                  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>
                  @

                  Nokia Certified Qt Specialist.
                  Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    Jazoja
                    wrote on last edited by
                    #9

                    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.

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      giesbert
                      wrote on last edited by
                      #10

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

                      Nokia Certified Qt Specialist.
                      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        Jazoja
                        wrote on last edited by
                        #11

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

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          giesbert
                          wrote on last edited by
                          #12

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

                          Nokia Certified Qt Specialist.
                          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            Jazoja
                            wrote on last edited by
                            #13

                            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.

                            1 Reply Last reply
                            0
                            • G Offline
                              G Offline
                              goetz
                              wrote on last edited by
                              #14

                              @#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.

                              http://www.catb.org/~esr/faqs/smart-questions.html

                              1 Reply Last reply
                              0
                              • J Offline
                                J Offline
                                Jazoja
                                wrote on last edited by
                                #15

                                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.

                                1 Reply Last reply
                                0
                                • J Offline
                                  J Offline
                                  Jazoja
                                  wrote on last edited by
                                  #16

                                  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)

                                  1 Reply Last reply
                                  0

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved