Innovation

Qt 4.8.7 Fix May 2026

#include <QApplication> #include <QLabel> int main(int argc, char *argv[])

configure -platform win32-g++ -prefix C:\Qt\4.8.7 mingw32-make mingw32-make install main.cpp

export PATH=/opt/qt487/bin:$PATH export QTDIR=/opt/qt487 export LD_LIBRARY_PATH=/opt/qt487/lib:$LD_LIBRARY_PATH Use Qt 4.8.7 binary for MinGW (if available) or compile with MSVC 2008 (officially supported). For MinGW: qt 4.8.7

export QT_X11_NO_MITSHM=1 export XLIB_SKIP_ARGB_VISUALS=1 QString str = "Hello"; QByteArray utf8 = str.toUtf8(); // correct // avoid: str.toAscii() or str.latin1() Missing std::sqrt or C++11 features Qt 4.8.7 expects C++98. Use qSqrt() from <QtGlobal> or #include <math.h> . No automatic high-DPI Use QApplication::setFont(QFont("Arial", 16)) or set environment variable:

FROM ubuntu:16.04 RUN apt-get update && apt-get install -y build-essential libgl1-mesa-dev ... ADD qt-everywhere-opensource-src-4.8.7.tar.gz /opt/ WORKDIR /opt/qt-everywhere-opensource-src-4.8.7 RUN ./configure -prefix /usr/local/qt487 ... && make -j4 && make install If you're starting a new project → do not use Qt 4

wget https://download.qt.io/archive/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz Alternate: https://download.qt.io/archive/qt/4.8/4.8.7/ Linux (Ubuntu 18.04/20.04 example) sudo apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev \ libx11-dev libxext-dev libxtst-dev libxrender-dev libxrandr-dev \ libxcursor-dev libxfixes-dev libxi-dev libxinerama-dev libfreetype6-dev \ libfontconfig1-dev libdbus-1-dev libssl-dev tar xzf qt-everywhere-opensource-src-4.8.7.tar.gz cd qt-everywhere-opensource-src-4.8.7 ./configure -prefix /opt/qt487 -opensource -confirm-license -nomake examples -nomake demos make -j$(nproc) sudo make install

wget https://download.qt.io/official_releases/qtcreator/3.5/3.5.1/qt-creator-opensource-linux-x86_64-3.5.1.run chmod +x qt-creator-opensource-linux-x86_64-3.5.1.run ./qt-creator-opensource-linux-x86_64-3.5.1.run Then set Kit → Qt version → /opt/qt487/bin/qmake . If you're starting a new project → do not use Qt 4.8.7 . int main(int argc

Add to your ~/.bashrc :

qt 4.8.7

En poursuivant votre navigation sur ce site, vous acceptez l'utilisation de cookies pour vous proposer des contenus et services adaptés à vos centres d'intérêts.