ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Okay you have just reminded me that QT was not free on Windows prior to release 4. However you can use QT4 on Kdevelop, I think what you need to do is to change the QPATH variable in you bash_profile file. I think that's what I did for Fedora but I'm working on windows today so I can't check ...
As I found no QT3 for windows, I guess I'll have to move up development on linux to QT4. Fortunately this is just a test and I can tweek as much as needed till I "figure it out".
In fact there is Free QT3 for Windows. It was distributes with Qt book, I don't know how the licence looks now, however (the book is now downloadable).
Quote:
How can I force kdevelop to use qt4? (it's a ubuntu breezy box).
Tricks... If you change PATH in configuration to point first to new executables, you have it done. Also, note that Qt4 has Qt3 compatibility classes (haven't tried them, through).
$ dpkg -l qt'*'
Desired=Unknown/Install/Remove/Purge/Hold
| Estado=No/Instalado/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: mayúsc.=malo)
||/ Nombre Versión Descripción
+++-========================-========================-================================================================
un qt-designer <ninguna> (no hay ninguna descripción disponible)
un qt-designer-doc <ninguna> (no hay ninguna descripción disponible)
un qt-doc <ninguna> (no hay ninguna descripción disponible)
un qt3-assistant <ninguna> (no hay ninguna descripción disponible)
ii qt3-designer 3.3.4-8ubuntu5 Qt3 Designer
ii qt3-dev-tools 3.3.4-8ubuntu5 Qt3 development tools
ii qt3-doc 3.3.4-8ubuntu5 Qt3 API documentation
un qt3-linguist <ninguna> (no hay ninguna descripción disponible)
un qt3-qtconfig <ninguna> (no hay ninguna descripción disponible)
un qt3-tools <ninguna> (no hay ninguna descripción disponible)
ii qt4-dev-tools 4.0.0-3ubuntu1 Qt 4 development tools
ii qt4-doc 4.0.0-3ubuntu1 Qt 4 API documentation
If I use update-alternatives I can make assitant-qt4, designer-qt4 and linguist-qt4 the "prefered" qt applications. You think that will be enough to use QT4 by default when using kdevelop?
after a little 'update-alternatives', I have this:
Code:
$ qmake -v
QMake version: 2.00a
Using Qt version 4.0.0 in /usr/lib
$ moc -v
Qt Meta Object Compiler version 58 (Qt 4.0.0)
$ uic -v
Qt user interface compiler 4.0.0.
What's next? simply call kdevelop3? or there's more tweeking to do?
PS
I just ran kdevelop, my old project, and asked to compile and it says:
QDIR=/usr/share/qt3
and it compiled successfully. I expected it to fail big time.
I thought it was gonna be an easy thing to change from qt3 to qt4, but it seems it isn't just a matter or running the new verion of qmake. I'll have to remake my very first project to see how qt4 works, cause there are many changes.
Will keep you posted. :-) Thanks for your help so far.
PS I'll be working without kdevelop till I figure the whole thing out.
$ qmake src.pro; qmake; make
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I. -o main.o main.cpp
main.cpp:25:51: error: formas/principal/ui_principalbase_qt4.h: No existe el fichero o el directorio
main.cpp: In function ‘int main(int, char**)’:
main.cpp:35: error: invalid use of undefined type ‘struct QDialog’
/usr/include/qt4/QtGui/qwindowdefs.h:39: error: forward declaration of ‘struct QDialog’
main.cpp:36: error: ‘Ui’ no se puede declarar
main.cpp:36: error: ‘PrincipalBase’ no se declaró en este ámbito
main.cpp:36: error: expected `;' before ‘ui’
main.cpp:37: error: ‘ui’ no se declaró en este ámbito
main.cpp:38: error: invalid use of undefined type ‘struct QDialog’
/usr/include/qt4/QtGui/qwindowdefs.h:39: error: forward declaration of ‘struct QDialog’
make: *** [main.o] Error 1
(by the way, when do I have to run "qmake .profile" or "qmake standalone" or both? )
If I uic it myself, going to that directory, then it works:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.