How to install Qt4 and Qt Creator for Qt4 on Ubuntu?
-
Having some old project, could not build on Qt6
how to install Qt4 and Qt Cretator for Qt4 on Ubuntu?Below no effect
sudo apt-get install qt5-qmake
sudo apt-get install qt5-default
sudo apt-get install libqt5gui5
sudo apt-get install qt5-doc
sudo apt-get install libqt5svg5-dev
sudo apt-get install libleptonica-dev -
@JacobNovitsky said in How to install Qt4 and Qt Cretator for Qt4 on Ubuntu?:
Qt4
Below no effect
sudo apt-get install qt5-qmake
sudo apt-get install qt5-default
sudo apt-get install libqt5gui5
sudo apt-get install qt5-doc
sudo apt-get install libqt5svg5-dev
sudo apt-get install libleptonica-devI mean - what do you expect? When you want to install Qt4 you have to insteall qt4 packages, not Qt5 ones... you have to look for the Qt4 packages (don't know if there're some - you have to look at the ubuntu repos).
-
@JacobNovitsky install a virtual machine and an old Ubuntu version(for example 18.04). Then, you may be able to use Qt4. I just checked my 18.04 and Qt 4.8.7 is available for installation.
-
@JacobNovitsky said in How to install Qt4 and Qt Cretator for Qt4 on Ubuntu?:
Qt Cretator for Qt4
Don't bother with the version of Qt Creator. It is mostly unrelated to the version of Qt you are using. If you want to use Qt 4 on a modern system you should compile it yourself.
-
Error when compiling Qt4 on Ubuntu 22.04
I also have an old project in Qt4, but my current system is Ubuntu 22.04, unfortunately the Qt4 package is NO longer available in the Ubuntu repositories. I was able to solve it by installing Qt4 with a PPA:
sudo add-apt-repository ppa:ubuntuhandbook1/ppa sudo apt update sudo apt install qt4-default
However, when installing Qt4 this way, it does not come with Qt designer 4.
My problem now is that I am trying to compile Qt4 from source code and I am getting the following error:
You don't seem to have 'make' or 'gmake' in your PATH. Cannot proceed.
could someone help me???
The last alternative, as @JoeCFD mentioned is to use a virtual machine with old Ubuntu 18.04.
-
@bl3ssedc0de
Just how large or complex is your Qt4 project? Rather than fiddling around trying to install and use, or create a VM with an old OS for, a very old Qt4 have you considered porting it to at least Qt5 (easier than to Qt6)? -
@JonB Actually they are not very complex, they are projects from my university, with Qt4 PyQt4 and Qt designer 4, they provided me with .exe executables for windows, but I am stubborn and I refuse to use windows 😁, after many tests, I found another alternative, without using an old operating system, using the arch linux AUR repositories, I achieved my goal of installing Qt4 PyQt4 and Qt Designer 4.
However, I am left with the question of how to compile Qt4 in Ubuntu and solve this compilation error:
You don't seem to have 'make' or 'gmake' in your PATH. Cannot proceed.
It shouldn't be impossible, I just don't have enough knowledge to solve it, I'm sharing this in case someone has the same problem in the future.
-
@bl3ssedc0de said in How to install Qt4 and Qt Cretator for Qt4 on Ubuntu?:
they are projects from my university, with Qt4 PyQt4 and Qt designer 4
Yes, probably over a decade old...
If you want to continue to work on the project(s), why you pick QtDesigner 4 and Qt4?
The program you show in the GIF does pretty much nothing... takes 5mins to rebuild the same with modern Qt6...For future Qt development and to learn Qt, I would not use Qt4
-
@bl3ssedc0de said in How to install Qt4 and Qt Cretator for Qt4 on Ubuntu?:
However, I am left with the question of how to compile Qt4 in Ubuntu and solve this compilation error:
You don't seem to have 'make' or 'gmake' in your PATH. Cannot proceed.To compile Qt (any version), or any project you write to use such libraries, you will need suitable tools installed; and you do not. The first line below will probably get you close but is only the start of the fun:
$ sudo apt update && sudo apt install build-essential g++ git $ git clone https://github.com/qt/qt.git qt4 $ cd qt4 $ git switch 4.8 $ ./configure --prefix=/usr/local --no-openssl --no-webkit ... Qt is now configured for building. Just run 'gmake'. Once everything is built, you must run 'gmake install'. Qt will be installed into /usr/local To reconfigure, run 'gmake confclean' and 'configure'. $ make ## or gmake... it is just a symlink
This will likely fail with compiler, default library changes, and other missing development packages.