Thursday, February 10, 2011

QWT

QWT stands for "Qt Widgets for Technical Applications". I installed the examples and successfully ran them in Qdevelop (but need to run them in a user folder. I ran into some permission problems in the original directory, /usr/share/doc/libqwt5-doc/examples/.)

The examples were too numerous to study, so I tried to separate one of them from the project. This was more difficult than I thought. The main trick was creating an environmental variable, QWT_ROOT=/usr/include/qwt-qt4 , to be located in my .profile (or .bashrc).  I also had to provide a link to qmake. Using the examples as a, well, as an example, I created two files which contained all the library paths, qwtconfig.pri and myproject.pri.

The sequence at the console is:
  • qmake -project , Creates myproject.pro
  • Edit myproject.pro and add the lines
    • include( myproject.pri )
    • include( qwtconfig.pri )
  • qmake , Creates Makefile
  • make , Creates executable, myproject
  • ./myproject  , Runs executable

No comments:

Post a Comment