Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to add qwt to a project?
QtWS25 Last Chance

How to add qwt to a project?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
9 Posts 7 Posters 9.6k Views
  • 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.
  • M Offline
    M Offline
    M_zx_7
    wrote on 2 Feb 2017, 21:13 last edited by
    #1

    I want to use qwt in a project. I have downloaded qwt to C:/

    then I opened up the Qt command line, and in the qwt-6.1.3 directory ran these commands:

    qmake
    mingw32-make
    mingw32-make install
    

    all ran to completion.

    Then in QTCreator, I opened my project and clicked the Projects button on the sidebar. I added to my PATH this:

    C:\qwt-6.1.3\lib
    

    Then I added the following line to my .pro file:

    CONFIG += qwt
    

    and finally I add the following to my header file:

    #include <qwt_plot.h>
    

    And then I try building. The error I receive is 'qwt_plot.h: No such file or directory'

    What am I missing? Why is this file not being found? I also tried separately adding these following lines:

    LIBS += -lqwt
    LIBS += -L$${QWT_LOCATION}/lib/qwt
    LIBS += -L$${QWT_LOCATION}/lib/libqwt
    

    but all fail.

    K 1 Reply Last reply 2 Feb 2017, 21:40
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 2 Feb 2017, 21:38 last edited by
      #2

      Hi and welcome to devnet,

      Did you follow the Qwt installation guide ?

      Note that the Qwt community has its own forum and channels that might get you help quicker.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • M M_zx_7
        2 Feb 2017, 21:13

        I want to use qwt in a project. I have downloaded qwt to C:/

        then I opened up the Qt command line, and in the qwt-6.1.3 directory ran these commands:

        qmake
        mingw32-make
        mingw32-make install
        

        all ran to completion.

        Then in QTCreator, I opened my project and clicked the Projects button on the sidebar. I added to my PATH this:

        C:\qwt-6.1.3\lib
        

        Then I added the following line to my .pro file:

        CONFIG += qwt
        

        and finally I add the following to my header file:

        #include <qwt_plot.h>
        

        And then I try building. The error I receive is 'qwt_plot.h: No such file or directory'

        What am I missing? Why is this file not being found? I also tried separately adding these following lines:

        LIBS += -lqwt
        LIBS += -L$${QWT_LOCATION}/lib/qwt
        LIBS += -L$${QWT_LOCATION}/lib/libqwt
        

        but all fail.

        K Offline
        K Offline
        koahnig
        wrote on 2 Feb 2017, 21:40 last edited by koahnig 2 Mar 2017, 10:32
        #3

        @M_zx_7

        The include path to your header files ist missing.

        [deleted, koahnig]

        Vote the answer(s) that helped you to solve your issue(s)

        M U 2 Replies Last reply 2 Feb 2017, 21:46
        -1
        • K koahnig
          2 Feb 2017, 21:40

          @M_zx_7

          The include path to your header files ist missing.

          [deleted, koahnig]

          M Offline
          M Offline
          M_zx_7
          wrote on 2 Feb 2017, 21:46 last edited by
          #4

          @koahnig Thank you, I will try these suggestions.

          1 Reply Last reply
          0
          • K koahnig
            2 Feb 2017, 21:40

            @M_zx_7

            The include path to your header files ist missing.

            [deleted, koahnig]

            U Offline
            U Offline
            uwer
            wrote on 3 Feb 2017, 10:16 last edited by uwer 2 Mar 2017, 10:19
            #5

            @koahnig Please excuse me for voting you down, but leaving answers like this one uncorrected causes a nightmare for me as package maintainer with users finding it in the archives going into the totally wrong direction.

            The idea of feature files ( CONFIG += qwt ) is that a user does not have to deal with the details you have posted and worst of all the answer is the opposite of, what the standard installation process is about. The commands for building Qwt ( or its examples ) are not the same as those you need for using it !

            The missing step instead is to configure qmake being able to resolve CONFIG += qwt, what basically means setting a path to where qwt.prf had been installed. How to do so is documented in http://qwt.sourceforge.net/qwtinstall.html#COMPILEANDLINKAPP.

            In case of not willing to work with a feature files, the correct commands to be copied into the application project file can be found inside the installed qwt.prf file - but not in the project files inside of the Qwt tarball for building the examples !!!

            K 1 Reply Last reply 3 Feb 2017, 10:30
            3
            • U uwer
              3 Feb 2017, 10:16

              @koahnig Please excuse me for voting you down, but leaving answers like this one uncorrected causes a nightmare for me as package maintainer with users finding it in the archives going into the totally wrong direction.

              The idea of feature files ( CONFIG += qwt ) is that a user does not have to deal with the details you have posted and worst of all the answer is the opposite of, what the standard installation process is about. The commands for building Qwt ( or its examples ) are not the same as those you need for using it !

              The missing step instead is to configure qmake being able to resolve CONFIG += qwt, what basically means setting a path to where qwt.prf had been installed. How to do so is documented in http://qwt.sourceforge.net/qwtinstall.html#COMPILEANDLINKAPP.

              In case of not willing to work with a feature files, the correct commands to be copied into the application project file can be found inside the installed qwt.prf file - but not in the project files inside of the Qwt tarball for building the examples !!!

              K Offline
              K Offline
              koahnig
              wrote on 3 Feb 2017, 10:30 last edited by
              #6

              @uwer

              Thanks for correcting my view.

              I think I never had the "CONFIG += qwt" in my code. I am wondering how this could happen since it had been modified from a qwt example some time back.

              I understand and agree with your comment for creating nightmares in support, therefore I am deleting the entry above.

              Vote the answer(s) that helped you to solve your issue(s)

              1 Reply Last reply
              0
              • A Offline
                A Offline
                as2017
                wrote on 12 Feb 2017, 18:06 last edited by
                #7

                Hi
                I have a project and I want to use qwt_text in it .
                So I installed qwt . Now I don't know how to include qwt_text in it:confused:

                I mean what are the neccessary changes that I have to make in my .pro file .

                I use ubuntu 10.10 , QtCreator 2.0.1 , Qt 4 , Qwt 5.2.1

                web design

                S 1 Reply Last reply 14 Mar 2019, 12:06
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 12 Feb 2017, 19:54 last edited by
                  #8

                  Hi,

                  Follow @uwer's advices and the link he posted.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • A as2017
                    12 Feb 2017, 18:06

                    Hi
                    I have a project and I want to use qwt_text in it .
                    So I installed qwt . Now I don't know how to include qwt_text in it:confused:

                    I mean what are the neccessary changes that I have to make in my .pro file .

                    I use ubuntu 10.10 , QtCreator 2.0.1 , Qt 4 , Qwt 5.2.1

                    web design

                    S Offline
                    S Offline
                    saftysign
                    Banned
                    wrote on 14 Mar 2019, 12:06 last edited by saftysign
                    #9
                    This post is deleted!
                    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