Results 1 to 2 of 2

Thread: Using QWT with QT-Creator on Ubuntu 10.10

  1. #1
    Join Date
    Jun 2011
    Location
    Delft, Netherlands
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Using QWT with QT-Creator on Ubuntu 10.10

    Hello,
    I successfully installed QWT and QTCreator on Ubuntu 10.10,
    using the official packages:
    Qt Code:
    1. sudo apt-get install libqwt5-qt4-dev
    2. sudo apt-get install libqwt5-doc
    3. sudo apt-get install qtcreator
    To copy to clipboard, switch view to plain text mode 
    This includes QT 4.7.0 and QT Creator 2.0.1.
    I succesfully compiled the examples:
    Qt Code:
    1. cd ~
    2. mkdir 00QT-Software
    3. cp -R /usr/share/doc/libqwt5-doc/examples .
    4. chown -R <your-user-name> examples
    5. cd examples
    6. gedit examplex.pri
    7.  
    8. > within this file, change the first line
    9. > after the comments to:
    10. > QWT_ROOT = .
    11. > save the file and exit the editor
    12.  
    13. qmake
    14. make
    15.  
    16. cd simple_plot/examples/bin
    17. ./simple
    To copy to clipboard, switch view to plain text mode 
    Now I try to build a QWT application with QTCreator. I have the QWT plugin,
    I could create a simple form with a QWTPlot widget on it.

    But if try to compile, I get the message:

    Qt Code:
    1. ufechner@dell-laptop:~/00QT-Software/FirstQWT$ qmake
    2. ufechner@dell-laptop:~/00QT-Software/FirstQWT$ make
    3. g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../examples/include -I. -I. -o mainwindow.o mainwindow.cpp
    4. In file included from mainwindow.cpp:2:
    5. ui_mainwindow.h:24: fatal error: qwt_plot.h: Datei oder Verzeichnis nicht gefunden
    6. compilation terminated.
    7. make: *** [mainwindow.o] Fehler 1
    8. ufechner@dell-laptop:~/00QT-Software/FirstQWT$
    To copy to clipboard, switch view to plain text mode 
    Any idea, how to fix this? I suppose, that I have to add something to my
    FirstQWT.pro file, but what?
    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by QtCreator 2011-06-10T15:34:00
    4. #
    5. #-------------------------------------------------
    6. # include( qwtconfig.pri )
    7.  
    8. QT += core gui
    9.  
    10. QWT_DIR = ../examples
    11.  
    12. INCLUDEPATH += $$QWT_DIR/include
    13.  
    14. TARGET = FirstQWT
    15. TEMPLATE = app
    16.  
    17.  
    18. SOURCES += main.cpp\
    19. mainwindow.cpp
    20.  
    21. HEADERS += mainwindow.h
    22.  
    23. FORMS += mainwindow.ui
    To copy to clipboard, switch view to plain text mode 
    Any suggestions welcome.

    Best regards:

    Uwe Fechner, TU Delft
    Last edited by ufechner; 11th June 2011 at 17:58.

  2. #2
    Join Date
    Jun 2011
    Location
    Delft, Netherlands
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Using QWT with QT-Creator on Ubuntu 10.10

    I solved this issue, but I don't know, whether it is the best approach:

    First I created a symbolic link:
    Qt Code:
    1. sudo ln -s /usr/lib/libqwt-qt4.so /usr/lib/libqwt.so
    To copy to clipboard, switch view to plain text mode 

    Then I changed the file FirstQWT.pro like this:
    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by QtCreator 2011-06-10T15:34:00
    4. #
    5. #-------------------------------------------------
    6. # include( qwtconfig.pri )
    7.  
    8. QT += core gui
    9.  
    10. INCLUDEPATH += /usr/include/qwt-qt4
    11. LIBS += /usr/lib/libqwt.so
    12.  
    13. TARGET = FirstQWT
    14. TEMPLATE = app
    15.  
    16.  
    17. SOURCES += main.cpp\
    18. mainwindow.cpp
    19.  
    20. HEADERS += mainwindow.h
    21.  
    22. FORMS += mainwindow.ui
    To copy to clipboard, switch view to plain text mode 

    If this is the correct approach, why is it nowhere documented?

    Best regards:

    Uwe Fechner

Similar Threads

  1. Qt Creator Problem on Ubuntu 10.10
    By Furkan in forum Qt Tools
    Replies: 4
    Last Post: 16th October 2010, 17:42
  2. Qt Creator in Ubuntu 10.04 Lucid Lynx
    By kevinchannon in forum Qt Tools
    Replies: 2
    Last Post: 22nd May 2010, 20:15
  3. Replies: 1
    Last Post: 28th February 2010, 06:31
  4. Replies: 0
    Last Post: 30th August 2009, 22:44
  5. Qt Creator 1.0.0 - LIB & PATH settings in Ubuntu
    By qoo in forum Installation and Deployment
    Replies: 1
    Last Post: 20th April 2009, 08:35

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.