QApplication app(argc, argv); QLabel label("Hello from Qt 4.8.7"); label.show(); return app.exec();
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:
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: qt 4.8.7
configure -platform win32-g++ -prefix C:\Qt\4.8.7 mingw32-make mingw32-make install main.cpp
#include <QApplication> #include <QLabel> int main(int argc, char *argv[]) QApplication app(argc, argv); QLabel label("Hello from Qt 4
Add to your ~/.bashrc :
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 int main(int argc
qmake -project qmake make ./your_app
MUTUAL FUND INVESTMENTS ARE SUBJECT TO MARKET RISKS, READ ALL SCHEME RELATED DOCUMENTS CAREFULLY.