Showing posts with label qdevelop. Show all posts
Showing posts with label qdevelop. Show all posts

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

Thursday, February 3, 2011

QDevelop or Console

I have been using Qdevelop for over a week now, including the gui Qdesigner for producing a  .ui program. I find that I am not learning anything. I am able to get things to work, but I do not really understand how. This morning, I tried to put the constructor, "void MainWindowImpl::rmdfunction()" into its own file, with a class definition in its same-named .h file. This did not produce a working program. Many errors which I did not understand.

Whenever I look at examples on the Internet, there are a multitude of different programming styles. The overlap between QT3 and QT4 does not help. If I manually enter these programs into an editor, and run them with qmake, they work. But I want to learn the proper or most consistent way to program in QT. That is the reason I am trying to work within the Qdevelop environment.