Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: How to include libqxt to use in my project

  1. #1
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default How to include libqxt to use in my project

    I am planning to use libqxt to use its emailing service. I downloaded the zip package from here. As per the README instruction, I first ran qmake, followed by make. Both worked fine. Now I see the lib folder being generated with a number of dynamic libraries and frameworks inside. Which one do I need to use for the emailing bit, as explained here?

    And which header files do I need to include?

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

    Default Re: How to include libqxt to use in my project

    You need to link with QxtNetwork.
    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
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Re: How to include libqxt to use in my project

    Thanks. Can you tell me how do I do that? There is a QxtNetwork.framework file in my lib folder now, and a QxtNetwork folder in includes, and the folder contains many binaries like QxtSshClient, QxtSshProcess, etc. Which ones do I need to link? And which header files do I need to include?

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

    Default Re: How to include libqxt to use in my project

    Doesn't the readme explain that?
    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. #5
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Re: How to include libqxt to use in my project

    Not much. It says this:


    1) configure

    make sure qmake is in your PATH and run ./configure or configure.bat on windows.

    see configure --help for more information

    (for msvc you could try ./configure.bat -msvc and open
    the solution file in msvc, we recomend compiling on
    commandline though)

    2) build

    type make or nmake when using msvc
    then don't forget to make install
    Note: This will also install qxt.prf to your qtdir/mkspecs/features directory.



    3) use

    Add the following lines to your qmake project file:
    CONFIG += qxt
    QXT += core gui

    The QXT variable should contain the modules you want. (In this example core and gui are used.)
    Note: Some modules depend on other modules. The required modules are added automatically.

    if you have an existing msvc project and can't swtich to qmake you can use zbenjamins solution:

    Howto use libqxt in a existing Visual Studio Project:
    1. create and install libqxt. (See install instructions)
    2. add {libqxtinstalldir}\include\qxt\QxtCore to your include path
    3. add {libqxtinstalldir}\lib to your library search path
    4. to add a specific libqxt module (f.e QxtSql) you have to:
    - add {libqxtinstalldir}\include\qxt\QxtSql to your include path
    - add the library QxtSql.lib to your project
    Most of the times you have also to include the QxtCore and QxtKit modules.
    It's done the same way like the example above.
    So I did the first two steps. I tried sudo make install, but it threw an error - cp: cannot stat ‘/Users/Cupidvogel/Desktop/mail/libqxt-master/doc/html/*’: No such file or directory. Anyway now I am left with the folder structure where there are includes, but not libraries. As per the example above, there sould be QxtSql.lib somehwere, can't find it. The lib folder contains QxtSql.framework, no QxtSql.lib..

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

    Default Re: How to include libqxt to use in my project

    To use QXT you need to follow step 3 from the readme. It clearly says what you should do.
    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.


  7. #7
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Re: How to include libqxt to use in my project

    Yes, it may, as you have already said, and I replied that I tried following it, and even gave my results about where exactly I am stuck. If you don't want to bother helping me, it's totally fine, but please don't continuously say the same thing = 'It is mentioned in step 3'.

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

    Default Re: How to include libqxt to use in my project

    You said you followed the first two steps, so what exactly did you do from step 3?
    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.


  9. #9
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Re: How to include libqxt to use in my project

    I said that I don't know where the libraries are installed. The lib folder consist of several frameworks, one of which is QxtNetwork.framework. There is no QxtSql.lib library, as mentioned in the MSVC step (even though I am using Mac). However, in the QxtNetwork.framework, if I go inside it, I find a folder called Versions, which contains another folder called Current. Inside that, there is a folder called includes which contains lots of header files, and a QxtNetwork file, which seems to be a binary. In order to follow step 3, modifying the CONFIG and QXT variables, I first need to place the appropriate binaries and dependencies in the right places. What to include, and where to?

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

    Default Re: How to include libqxt to use in my project

    Quote Originally Posted by Cupidvogel View Post
    IIn order to follow step 3, modifying the CONFIG and QXT variables, I first need to place the appropriate binaries and dependencies in the right places.
    No, you need to modify your CONFIG and QXT variables:

    3) use

    Add the following lines to your qmake project file:
    CONFIG += qxt
    QXT += core gui

    The QXT variable should contain the modules you want. (In this example core and gui are used.)
    Note: Some modules depend on other modules. The required modules are added automatically.
    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.


  11. #11
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Re: How to include libqxt to use in my project

    Seriously? I will modify CONFIG and QXT in my pro file and it wil magically find where they are located in my HDD? Anyway, I did that. The build ran fine, no error. But I need to use QxtSMTP, so I added network along with core and gui. How do I import QXtSMTP? By just including the source/lib/includes to my project and add that path in the INCLUDEPATH?

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

    Default Re: How to include libqxt to use in my project

    Quote Originally Posted by Cupidvogel View Post
    Seriously? I will modify CONFIG and QXT in my pro file and it wil magically find where they are located in my HDD?
    Yes, because qxt.prf was copied to your Qt installation directory. Exactly as written in the readme file...

    How do I import QXtSMTP?
    The docs suggest:

    Qt Code:
    1. #include <QxtSmtp>
    To copy to clipboard, switch view to plain text mode 

    By just including the source/lib/includes to my project and add that path in the INCLUDEPATH?
    You don't need to modify INCLUDEPATH. That's what the CONFIG+=qxt thing does.
    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.


  13. #13
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Re: How to include libqxt to use in my project

    Thanks. The writing to the .prf file failed I guess, for the make install step failed with the message I gave. Any idea on how to fix it? And if this is how it works, then how do I package the code?

    For you understanding, we include all libraries and dependent header files in our source/lib folder. The project.pro files specifies that based on platform (say Mac or Windows), the appropriate binaries and header files are copied into the install directory. The binaries which we main in the source/lib are pushed to Git repo through git-fit. Here what do I push then? Where are the libraries and includes which I need to ship?

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

    Default Re: How to include libqxt to use in my project

    Quote Originally Posted by Cupidvogel View Post
    The writing to the .prf file failed I guess, for the make install step failed with the message I gave.
    The message was that the documentation could not be copied. This has nothing to do with the prf file. You can see if it was copied or not yourself (the readme file lists the location where this file is going to be copied).
    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.


  15. #15
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Re: How to include libqxt to use in my project

    No, it hasn't been copied. However I do find a qxt.prf file in the features folder in the libqxt-master folder (from where I ran make and configure initially).

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

    Default Re: How to include libqxt to use in my project

    The docs are built by calling "make docs". You can try building them and see if the installation continues when calling make install (remember about write access rights to the target directory).
    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.


  17. #17
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Re: How to include libqxt to use in my project

    Sigh. I am getting malloc error trap. Is there no other way to do it? That is, by not modifying CONFIG or qxt variables, but by including the necessary libraries and header files in the appropriate path manually?

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

    Default Re: How to include libqxt to use in my project

    Quote Originally Posted by Cupidvogel View Post
    Sigh. I am getting malloc error trap.
    Where are you getting it?

    Is there no other way to do it? That is, by not modifying CONFIG or qxt variables, but by including the necessary libraries and header files in the appropriate path manually?
    Sure. You can copy whatever is in the prf file to your pro file and adjust all the variables manually. Don't expect my help with that though
    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.


  19. #19
    Join Date
    May 2014
    Posts
    136
    Thanks
    72
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    MacOS X Windows

    Default Re: How to include libqxt to use in my project

    /Users/Cupidvogel/Desktop/mail/libqxt-master/src/core/qxtglobal.cpp:201: Undocumented parameter 'PUB' in QXT_P()
    /Users/Cupidvogel/Desktop/mail/libqxt-master/src/core/qxtglobal.cpp:201: No such parameter 'QXT_DECLARE_PUBLIC' in QXT_P()
    qdoc3(31442,0x7fff79948300) malloc: *** error for object 0x1109c1a40: pointer being freed was not allocated
    *** set a breakpoint in malloc_error_break to debug
    /bin/sh: line 1: 31442 Abort trap: 6 ( QXT_SOURCE_TREE=/Users/Cupidvogel/Desktop/mail/libqxt-master QXT_BUILD_TREE=/Users/Cupidvogel/Desktop/mail/libqxt-master /Users/Cupidvogel/Desktop/mail/libqxt-master/tools/3rdparty/qdoc3/qdoc3 -DQXT_DOXYGEN_RUN /Users/Cupidvogel/Desktop/mail/libqxt-master/doc/src/qxt.qdocconf )
    make: *** [adp_docs] Error 134
    The .prf file contains something like this:

    contains(QXT, network) {
    contains(QXT_MODULES, network)EFINES += QXT_NETWORK_LIB
    else:warning(Qxt was built without QxtNetwork)

    DEPENDPATH += $${QXT_INSTALL_HEADERS}/QxtNetwork
    INCLUDEPATH += $${QXT_INSTALL_HEADERS}/QxtNetwork
    macx:INCLUDEPATH += $${QXT_INSTALL_LIBS}/QxtNetwork.framework/HEADERS/

    qtAddLibrary(QxtNetwork)
    QXT += core
    QT += network
    }
    Now I can find the $${QXT_INSTALL_LIBS}/QxtNetwork.framework/HEADERS/ and include all header files. By $${QXT_INSTALL_HEADERS}/QxtNetwork, I guess it means the the QxtNetwork folder in includes, which contains lots of header files without .h extension. I opened some of them, all they do is reference the corresponding .h file in
    $${QXT_INSTALL_LIBS}/QxtNetwork.framework/HEADERS/, i.e, the QxtJSONRpcClient file in include/QxtNetwork has only one line - "#include "qxtjsonrpcclient.h", and the qxtjsonrpcclient.h file is present in $${QXT_INSTALL_LIBS}/QxtNetwork.framework/HEADERS/.

    Where do I get the libraries?

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

    Default Re: How to include libqxt to use in my project

    Within the calls to qtAddLibrary.
    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.


Similar Threads

  1. Replies: 4
    Last Post: 6th March 2019, 20:57
  2. Include Qt5Sparql in project
    By KeineAhnung in forum Newbie
    Replies: 0
    Last Post: 1st September 2014, 20:02
  3. How to Include QwtPolar in Project
    By cr7tiano in forum Qwt
    Replies: 3
    Last Post: 7th April 2014, 23:05
  4. How to Include Qwt in My Project
    By gbmtoday in forum Qwt
    Replies: 8
    Last Post: 3rd February 2011, 01:13
  5. How to include existing files to project?
    By Asperamanca in forum Qt Tools
    Replies: 2
    Last Post: 14th November 2009, 20:50

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.