How do you "use" Qt3 or Qt4? Just change a few variables. Qt4 basically only needs to have qmake first in the PATH variable. Open a new terminal session and set PATH to
$ export PATH=/path/to/qt4/bin:$PATH
and work on Qt4 in that terminal session if you work on command line.
If you want to use a pre-made Qt4 template and KDevelop, you then need KDevelop 3.4 branch
$ svn co svn://anonsvn.kde.org/home/kde/branches/kdevelop/3.4/
Note: build KDevelop against Qt3 and kdelibs from KDE3.
Then before running KDevelop, set in a terminal:
$ export PATH=/path/to/qt4/bin:$PATH
and run KDevelop from that terminal.
kdevelop &
In KDevelop choose
Project-> New Project -> C++ -> QMake Project -> Qt4 Application
You are asked the Project name then in the second page you can fill in the Qt4 path to qmake and to designer.

In KDevelop Build menu, choose "Build Project" or click F8 and then "Execute Main Program" (Shift - F9) and you'll get the following:

You can then add a .ui file for example using the QMake Manager on the right in KDevelop:

Right click on SOURCES and choose "Create New File" and in the dialog choose for example "QT4 Widget" and add the name of the file. Click OK and the .ui file will be added in your project (the file is created in the /src dir and also added in the .pro file). In the QMake Manager you will see a FORMS section and your .ui file is there. Clicking on it will open Designer and you will be able to start designing!
3 comments:
Also note that KDevelop 3.4 will be released very soon (together with KDE 3.5.6), I believe it was the 23rd of January. So if you don't like checking out SVN branches, you'll get all the great new stuff nevertheless.
If it is not already, this blog should go into the KDevelop wiki :)
KDevelop 3.4 will indeed be released with KDE 3.5.6.
This 3.4 version is rock solid, LOTS of bugs have been fixed. Let me thank all the KDevelop team, especially the new comers. Everyone of them did an amazing job. The only minus point is the KDevelop Handbook but the release is awesome and very very polished!
Post a Comment