Results 1 to 20 of 36

Thread: Need help installing Qwt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2010
    Posts
    63
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need help installing Qwt

    Quote Originally Posted by mpita View Post
    Try to change the Qwt sources place (..maybe on desktop?), clean all the past installation tries (AFAIK just delete the C:\Qwt-... directory) and then try to rebuild/install using 'mingw32-make' command.
    I did. And it worked ! I didn't see any error messages this time, just a few warnings.

    Quote Originally Posted by mpita View Post
    At the end of the install procedure, you should find inside the C:\Qwt.. directory the compiled libreries (.a and .dll), the headers, and the QT designer plugin.

    Hope this may helps.
    Indeed, the files are there. It sure did help. Thank you so much !

    -----
    A few more questions:

    1.)
    The INSTALL file then says:

    Quote Originally Posted by INSTALL file
    Don't forget to tell qmake where to find qwt.prf:
    qmake -set QMAKEFEATURES ...
    I took this to mean:
    Type qmake -set QMAKEFEATURES qwt.prf
    *after* the installation in *any* folder inside the shell.
    I did that and the shell neither showed any error nor success message, so I guess it worked ?

    2.) About using Qwt...
    I checked the section about adding new features.

    It says I have to add the feature file to the CONFIG environment variable. I currently don't have CONFIG in my environment variables (as listed in Qt Creator's Projects menu). I have CONFIGSETROOT. Is that the one or do I have to add CONFIG separately ?
    Hint: Think carefully before picking a user name.

  2. #2
    Join Date
    Oct 2011
    Location
    Venice, Italy
    Posts
    20
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help installing Qwt

    Let's begin from the last question: 'CONFIG' is not an enviroment variable but is one of the most important qmake variable. If you take a look to your project (.pro) file, you'll find a reference to this variable.

    Take a look here http://doc.qt.nokia.com/4.7/qmake-va...reference.html

    For example, with CONFIG, you can set if a library must build statically or dinamically or just tell if you want to see gcc warning messages.

    Let's go on: when you launch the qmake -set QMAKEFEATURES path/qwt.prf, you tell to qmake that a new feature is available and all its information is stored inside the prf file specified. Adding Qwt as feature to your project allow you to enable Qwt just setting 'CONFIG += qwt' to your .pro, without care about paths; you can also add to your project Qwt specifying the qwt path into INCLUDEPATH, LIBS... it's the "dirty way"...!

    If I scared you, maybe it's time to have a "quick" look to qmake world and all its features...!

    http://doc.qt.nokia.com/4.7/qmake-running.html
    Last edited by mpita; 5th October 2011 at 21:02.

  3. The following user says thank you to mpita for this useful post:

    Computer Hater (6th October 2011)

  4. #3
    Join Date
    Nov 2010
    Posts
    63
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need help installing Qwt

    I see. I guess I could have seen that from the context in which CONFIG was used in the INSTALL file, but I missed it.

    So, now I entered "qmake -set QMAKEFEATURES <path-to-qwt.prf>" on the command line.
    I still got no feedback message, neither positive nor negative.

    I then added "CONFIG += qwt" to my makefile (which btw didn't have any CONFIG statement before). The project compiled.

    I could not instantly see if any Qwt functionality was available.
    I tried typing "qwt" in my source code in Creator and auto completion suggested "QWT_DLL" and "QWT_MAKEDLL" which I suppose wouldn't have been available before.
    Oddly enough, after re-opening my project this doesn't work anymore.
    Also, when I tried e.g. typing 'include "qwt' or 'include <qwt' at the top of my header files it wouldn't suggest any of the Qwt classes for completion.

    Another thing is that I tried to open one of the Qwt examples and realized they had not been installed in the C:\Qwt-6.0.1\ folder. I still have them in the source folder on my desktop. Can I just move them to a new more convenient location or do I have to do another reinstall from a permanent source location ? (I don't want to leave the folder on my desktop for permanent access.)

    Sorry for being such a piece of work. :-/
    Hint: Think carefully before picking a user name.

  5. #4
    Join Date
    Oct 2011
    Location
    Venice, Italy
    Posts
    20
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help installing Qwt

    First of all, I was talking about "project file" (myfantasticqtproject.pro): I supposed that you own a Qt project where you want to place some Qwt stuff; Makefiles are another kind of file that you should not care about.

    Usually you open .pro files with Qt Creator, that runs for you 'qmake' command and produces the Makefiles for debug and release. It's the easiest way to develop with Qt.

    If you installed qwt on its default target (C:\Qwt-6.0.1\), then you need to run 'qmake -set QMAKEFEATURES C:\Qwt-6.0.1\features' just one time and its doesn't show anything on output. Checking that qmake has successfully recognized the features path is possible with command 'qmake -query QMAKEFEATURES'.

    Open your project file with a text editor or with the Qt Creator plain text editor, find the line "QT += .." and add the following line

    CONFIG += qwt


    Finally you're ready to go: try to add to your project a widget that shows a simple QwtPlotCurve.

    Maybe you didn't compile the examples, try to check that inside 'C:\<path of your qwt sources\qwtconfig.pri' the line QWT_CONFIG += QwtExamples is uncommented. If so uncomment that line then rebuild qwt.

    Ciao!
    Marco

  6. The following user says thank you to mpita for this useful post:

    Computer Hater (10th October 2011)

  7. #5
    Join Date
    Nov 2010
    Posts
    63
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need help installing Qwt

    Quote Originally Posted by mpita View Post
    First of all, I was talking about "project file" (myfantasticqtproject.pro): I supposed that you own a Qt project where you want to place some Qwt stuff; Makefiles are another kind of file that you should not care about.
    Right. That was a stupid typo on my part. I meant I had edited my project file to include "CONFIG += qwt", not the makefile. And the project file didn't already have a CONFIG line, so I added the first CONFIG statement there.


    Quote Originally Posted by mpita View Post
    If you installed qwt on its default target (C:\Qwt-6.0.1\), then you need to run 'qmake -set QMAKEFEATURES C:\Qwt-6.0.1\features' just one time and its doesn't show anything on output. Checking that qmake has successfully recognized the features path is possible with command 'qmake -query QMAKEFEATURES'.
    Okay, I checked with the query command and it shows the features folder. So that part worked.


    Quote Originally Posted by mpita View Post
    Maybe you didn't compile the examples, try to check that inside 'C:\<path of your qwt sources\qwtconfig.pri' the line QWT_CONFIG += QwtExamples is uncommented. If so uncomment that line then rebuild qwt.
    That line is uncommented. However, inside my "C:\Qwt-6.0.1\" folder there are only the sub-folders "doc", "features", "include", "lib" and "plugins", none of which contains the source code or project files of the examples. Those are still in the source folder on my desktop. Hence my question if that source folder should have been placed somewhere more permanently and stick around as a source for the Qwt example projects. Up until now I had thought the examples would be copied into the installation target along with the rest.
    Some of the other folders and files from the original source location are also missing.

    What would I do ? Copy the examples manually to somewhere else or reinstall from another source location ?


    Quote Originally Posted by mpita View Post
    Finally you're ready to go: try to add to your project a widget that shows a simple QwtPlotCurve.
    The thing is that Qt Creator's source code editor doesn't seem to recognize anything starting with "Qwt" and the design area doesn't offer Qwt widgets.
    I suppose I have to execute the last paragraph from the Qwt INSTALL file first:

    For using the designer plugin you have to configure the Qt designer/creator
    where to look for plugins. This can be done by setting the QT_PLUGIN_PATH or
    using a qt.conf file ( see http://doc.qt.nokia.com/4.7/deployment-plugins.html ).
    Beside the plugin the Qwt library itsself also needs to be known to the Designer/Creator
    ( see LD_LIBRARY_PATH, PATH ... above ).
    The given link says QT_PLUGIN_PATH is an environment variable. In my project's environment variables there wasn't a QT_PLUGIN_PATH variable, so I set it.
    The Projects menu in Creator then specifically said:
    Using System Environment and
    Set QT_PLUGIN_PATH to C:\Qwt-6.0.1\plugins\designer\


    I tried it with and without the \designer sub-folder, but it is still not recognized.

    Now in the Qt Plugin section it says that the Qt version number must not be lower than the plugin version number. My Qt version is 4.7.3. But where do I find the plugin version ?

    Also, it says:

    When building plugins to extend an application, it is important to ensure that the plugin is configured in the same way as the application. This means that if the application was built in release mode, plugins should be built in release mode, too.
    I don't think I have "built" the plugin yet.
    Maybe the problem is still with why the examples are not installed and the rest will fall in line ?
    Hint: Think carefully before picking a user name.

  8. #6
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help installing Qwt

    Quote Originally Posted by Computer Hater View Post
    I don't think I have "built" the plugin yet.
    Maybe the problem is still with why the examples are not installed and the rest will fall in line ?
    The examples are not installed because there is no reason to install them. That is intended - nothing wrong.

    Uwe

  9. #7
    Join Date
    Oct 2011
    Location
    Venice, Italy
    Posts
    20
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help installing Qwt

    If you want to use the qwt designer plugin the esiest way is to copy the 'qwt_designer_plugin.dll' file inside 'plugins\designer' of your qt framework. It's not the right way but, it works in 2 seconds (and worked for me). Then via 'About Plugins' inside the Designer's Help menu you should see if the plugin is successfully been loaded.

    If examples are already compiled, their binaries lay on C:\<path of your qwt sources>\examples\bin.

    If your creator doesn't find any qwt header, try to set in yout project file

    INCLUDEPATH += <qwt installation path>/include/

    Then run qmake again. Try to add #include <qwt_curve_plot.h>

    Ciao!

    Marco

  10. #8
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Need help installing Qwt

    Quote Originally Posted by mpita View Post
    It's not the right way but, it works in 2 seconds (and worked for me).
    2 seconds of wasted time, because he already configured the path ( what also works in 2 seconds ) + a source for having problems in the future.

    Instead the missing step should be to configure the environment ( PATH, LD_LIBRARY_PATH ... ), so that the Creator can find the Qwt library, when it is loading the plugin.

    Of course Qwt plugin/library need to be compatible with the Creator - that doesn't need be compatible to the Qt version you are trying to build your application with.
    So when Creator and Qt installation are incompatibel you need to build and install Qwt twice.

    Uwe

Similar Threads

  1. installing qwt
    By szisziszilvi in forum Qwt
    Replies: 14
    Last Post: 9th February 2011, 08:56
  2. installing qt using
    By impeteperry in forum Installation and Deployment
    Replies: 2
    Last Post: 30th December 2009, 15:41
  3. Installing Qwt 5.1.1
    By WXNSNW in forum Qwt
    Replies: 3
    Last Post: 18th September 2008, 14:06
  4. Installing Qt 4 on Mac os X
    By qtray in forum Installation and Deployment
    Replies: 1
    Last Post: 8th August 2008, 21:34
  5. Installing
    By bsws1079 in forum Newbie
    Replies: 3
    Last Post: 2nd April 2007, 23:19

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
  •  
Qt is a trademark of The Qt Company.